/** * 7z container — read and write `.7z` archives. * * Built on the engine's LZMA: the writer stores each file in its own folder with * a copy or LZMA1 coder and a plain header; the reader parses the 7z structure * (plain or LZMA-encoded header) and decodes copy / LZMA1 / LZMA2 single-coder * folders — covering archives from `7z a` (LZMA2 by default), `-m0=lzma`, and * `-m0=copy`. Multi-coder folders (e.g. BCJ filter chains) are reported as * unsupported rather than silently mis-decoded. * * @example * ```ts * import { sevenZip, unSevenZip } from '@myrialabs/zipkit'; * const archive = await sevenZip([{ name: 'a.txt', data: strToU8('hi') }]); * const files = await unSevenZip(archive); * ``` */ /** An entry to write into a 7z archive. */ export interface SevenZipEntryInput { /** Path within the archive (use `/` separators). */ name: string; /** File contents. */ data: Uint8Array; /** Coder: `'lzma'` (default, dense) or `'copy'` (stored). */ method?: 'lzma' | 'copy'; /** LZMA level 0–9 (default 6). */ level?: number; } /** A decoded 7z entry. */ export interface SevenZipEntry { /** Path within the archive. */ name: string; /** File contents. */ data: Uint8Array; /** Uncompressed size in bytes. */ size: number; } /** * Create a 7z archive from `entries`. Each file is stored in its own folder * (non-solid) with an LZMA1 or copy coder and a plain (uncompressed) header. */ export declare function sevenZip(entries: SevenZipEntryInput[]): Promise; /** Read a 7z archive into its entries. */ export declare function unSevenZip(data: Uint8Array): Promise; //# sourceMappingURL=index.d.ts.map