ZipReader

class ZipReader(bytes: ByteArray)

Minimal ZIP reader for EPUB / OCF containers. Parses the central directory, then reads entries on demand (STORED or raw DEFLATE via the shared Inflate).

Scoped to what EPUB needs: methods 0 and 8, no ZIP64, no encryption, no streaming data descriptors (sizes come from the central directory). Not a general-purpose ZIP implementation.

Constructors

Link copied to clipboard
constructor(bytes: ByteArray)

Properties

Link copied to clipboard

Entry names, in central-directory order.

Functions

Link copied to clipboard
fun read(name: String): ByteArray?

Decompressed bytes of name, or null if absent / unreadable.

Link copied to clipboard
fun readText(name: String): String?

UTF-8 text of name, or null.