/** * Central-directory-driven ZIP reader (CONTRACTS.md §1). * * `open` parses the end-of-central-directory chain and the central directory, * then structurally validates every entry's local header (signature and * bounds — so an archive that opens can always be fully read and re-saved); * entry data is never touched until `read`/`readRaw`. Central-directory * values are authoritative throughout — local headers are consulted only to * locate the start of an entry's data. */ import { type ZipEntryInfo, type ZipRawEntry, type ZipReaderOptions } from './common.js'; export declare class ZipReader { #private; private constructor(); /** * Parse the archive's central directory and structurally validate every * entry's local header (signature + bounds). Entry data is left untouched. * Follows the ZIP64 EOCD locator/record when the classic EOCD fields carry * sentinel values. Rejects multi-disk archives, names that would escape the * extraction root (zip-slip), central records that declare a ZIP64 * sentinel value (0xFFFFFFFF size/offset, 0xFFFF disk) without a ZIP64 * extra field to back it, entries whose declared compression ratio * exceeds the configured cap (per-entry zip bomb guard), central records * that share a local-header offset (overlapping/quine bombs), and archives * whose total declared uncompressed size exceeds the aggregate budget * (default `maxCompressionRatio × archive length` — see * {@link ZipReaderOptions.maxTotalUncompressedSize}). */ static open(data: Uint8Array, options?: ZipReaderOptions): Promise; /** All central directory records, in central-directory order (duplicates included). */ entries(): readonly ZipEntryInfo[]; /** Look up an entry by exact name. Last central-directory record wins. */ entry(name: string): ZipEntryInfo | undefined; /** True when an entry with this exact name exists. */ has(name: string): boolean; /** * Decompress and return an entry's data. Validates CRC-32 and the declared * uncompressed size; throws on mismatch or on unsupported methods. */ read(name: string): Promise; /** * Return the compressed stream verbatim plus everything `ZipWriter.copyRaw` * needs (central metadata and the local extra field). No CRC validation. */ readRaw(name: string): Promise; } //# sourceMappingURL=reader.d.ts.map