tinyzip
tinyzip is a tiny no_std, no_alloc ZIP navigation crate.
It does not decompress data. It only finds the central directory, iterates entries, and exposes raw byte ranges so callers can read names, comments, extra fields, local headers, and the stored or compressed payload bytes themselves.
Supported
- Single-disk ZIP archives
- Leading prefix data and trailing junk
- EOCD and ZIP64 EOCD/locator
- Central-directory iteration without buffering the directory
- Lazy reading of variable-length metadata and local headers
Not Supported
- Multi-disk ZIP archives
- Decompression
- Filename decoding / path normalization
- Central-directory encryption or compressed central-directory structures
Core API
use ;
The API stays low-level on purpose:
Readeris a tiny random-access trait that can be implemented directly on top of immutable positioned reads.- With the
stdfeature,tinyzip::std_io::ReadSeekReaderadaptsRead + Seekandtinyzip::std_io::UnixFileReaderadapts UnixFileExt. Archivestores only fixed-size archive metadata.Entryborrows the archive and holds one parsed central-directory record.- ZIP paths are exposed as raw bytes; they may be nested
/-separated paths, bare file names, or directory markers ending in/. Entry::path_is_utf8()exposes whether the ZIP metadata marks the path as UTF-8.- Variable-length fields are read into caller-provided buffers.
- Data location is resolved lazily from the local header only when needed.