Expand description
Forensic-grade ZIP reader.
The headline capability is deflate-block-indexed random access: a forensic
image stored in a ZIP (an E01 Defl:N entry at ~0% compression) is, at the
deflate level, a run of stored blocks (BTYPE=00). Those blocks are
byte-aligned, so the uncompressed entry can be addressed at any offset by
seeking directly to the right block — without inflating from the start.
This lets a downstream reader (e.g. the EWF parser) random-access a multi-GB
image inside a ZIP with no temp extraction and no repeated decompression.
Genuinely-compressed entries fall back to a correctness-preserving full decompress (no worse than extracting the entry), so the type is universal.
Structs§
- Archive
Summary - Container-level offsets/counts, for the forensic analyzer’s structural audits
(trailing data, spanning, etc.). Returned by
ZipArchive::summary. - Entry
Layout - One entry’s raw structural layout: the central-directory and local-file-header copies of its fields plus offsets, for cross-checking (tamper detection).
- Extra
Fields - Parsed common ZIP extra fields (central-directory copy). Unset fields are
None. Timestamps are surfaced verbatim: NTFS times are Windows FILETIME (100 ns ticks since 1601-01-01 UTC); Unix times are signed seconds since the epoch. - Header
Fields - Header fields as recorded in one header copy (central directory OR local file
header). Exposed via
ZipArchive::structural_viewfor the forensic seam. - Stored
ZipEntry - A random-access view over one uncompressed ZIP entry.
- ZipArchive
- A parsed ZIP archive over a seekable reader.
- ZipFile
- A decoding reader over one ZIP entry. Implements
Read, yielding decompressed bytes and verifying CRC-32 at EOF (fail loud on mismatch).
Enums§
- Compression
Method - ZIP compression method, mirroring zip-rs
CompressionMethodfor the common methods plus anUnknown(raw)that preserves the offending value. - Format
Error - Structural defects in a ZIP container. Each variant preserves the offending value/location (CLAUDE.md “Show the unrecognized value”).
- ZipCore
Error - Errors from opening or reading a ZIP entry.
Functions§
- open_
entry - Open a single entry of a ZIP archive for random access.