/** * ZIP writer (CONTRACTS.md ยง1). * * - `add` computes the CRC in-module, writes real sizes/CRC in the local * header (never data descriptors), and deflates unless `compress: false`. * - `copyRaw` reproduces a source entry's compressed stream byte-for-byte and * rebuilds its local header from central-directory values (bit 3 cleared). * - ZIP64 records are emitted automatically when entry count, sizes, or * offsets exceed the classic limits. * * Output is deterministic: fixed default timestamps, no clock reads. */ import { type ZipAddOptions, type ZipRawEntry } from './common.js'; export declare class ZipWriter { #private; /** * Compress (unless `compress: false`) and append an entry. The local header * carries real sizes and CRC โ€” no data descriptor, so bit 3 stays clear. * Flag bit 11 (UTF-8 name) is set only for non-ASCII names. */ add(name: string, data: Uint8Array, options?: ZipAddOptions): Promise; /** * Append a raw entry from `ZipReader.readRaw` without recompressing: the * compressed stream is copied byte-for-byte, the local header is rebuilt * from central-directory values with bit 3 (data descriptor) cleared, and * all other metadata โ€” times, versions, attributes, extra fields, comment โ€” * carries over verbatim. ZIP64 extra fields are the one exception: they are * regenerated to match the entry's sizes and its offset in the new archive. */ copyRaw(raw: ZipRawEntry): void; /** * Write the central directory (+ ZIP64 EOCD record and locator when needed) * and the end-of-central-directory record, and return the archive bytes. * The writer is unusable afterwards. */ finish(): Promise; } //# sourceMappingURL=writer.d.ts.map