Repository navigation
v1.1.0
Additive over 1.0.0: no public API was removed or changed, and compressed bytes are unchanged for every codec and level. Every new mode is off by default.
Added
ArchiveLimits.LargeArchive(4,000,000 entries, 256 GiB declared size, every other limit at its default) and a "Large archives" section indocs/archive.md: withZipReaderOptions.LazyDirectorya million-entry mail export opens, lists and extracts. The defaults are unchanged.- Zip lazy central directory (
ZipReaderOptions.LazyDirectory, also throughArchiveOpenOptions.Zip): a seekable zip is enumerated record by record without holding the directory, so memory no longer grows with the entry count (a million-entry archive: 630 MiB held by the default reader, under 1 MiB by the lazy one), andOpenEntryStream(entry)seeks to any entry the reader returned earlier. The directory is validated before the first entry, with the same overlap and shared-header checks and the same errors;MaxCentralDirectorySizedoes not apply, and a symbolic link's target is read when its entry is handed out. Off by default; the default mode is unchanged. Thezip-read-lazyfuzz target covers it. - Compound file recovery mode (
CompoundFileReaderOptions.Recovery,MaxRecoveryBytes;CompoundFileReader.Damage,IsRecovered;CfbDamage,CfbDamageKind;CfbEntry.IsDamaged,DeclaredSize), also reachable throughArchiveOpenOptions.CompoundFile. A file the strict reader refuses is opened anyway when it can be: a cut-short file, FAT/DIFAT/mini FAT entries that point outside the file, chains that loop or end early, a lost directory start, bad directory entries and links (unreachable entries are attached to the root), header fields that disagree with the file. Streams that cannot be followed to their declared size are shortened and flagged; every problem is listed inDamage. Off by default; reading is unchanged without it, and a file that passes the strict checks reads the same either way. Thecfb-recoverfuzz target covers it.
Changed
- Extraction no longer remembers every extracted file: only formats that can carry hard links (tar, RAR, cpio) keep file paths, the checked-directory cache is capped, and directories without permissions or times to restore are not queued. Extracting a million-entry zip went from 312 MiB held (369 MiB peak working set) to under 1 MiB held (94 MiB, the runtime's baseline). No safety check changed.