readPrefix

fun readPrefix(name: String, maxBytes: Int): ByteArray?(source)

The first maxBytes bytes of name, or all of them when the entry is shorter, or null when it is absent or unreadable. It inflates only as far as it needs and checks no CRC-32, so it reads a file's header without the rest of it.