/** * "Smallest possible" packing. * * `pack()` tries the densest codecs (brotli, lzma, bzip2, zstd-ultra) and keeps * the smallest result, tagged with a one-byte codec id so `unpack()` can * reverse it without being told which codec won. Use it when output size * matters more than compression time and both ends are ZipKit. * * The async {@link pack}/{@link unpack} helpers lazily load the shared engine; * the synchronous {@link packSync}/{@link unpackSync} take an already-loaded * engine and back {@link import('./zipkit.js').ZipKit.pack}. */ import { type ZipKitEngine } from './engine.js'; /** Codec name for each pack tag, indexed by the leading tag byte. */ export declare const PACK_CODECS: readonly ["brotli", "lzma", "bzip2", "zstd"]; /** Pack with an already-loaded engine. */ export declare function packSync(engine: ZipKitEngine, data: Uint8Array): Uint8Array; /** Reverse {@link packSync} with an already-loaded engine. */ export declare function unpackSync(engine: ZipKitEngine, data: Uint8Array): Uint8Array; /** * Compress to the smallest output across brotli/lzma/bzip2/zstd-ultra, tagged so * {@link unpack} can reverse it. Async; lazily loads the shared engine. For the * synchronous form load an engine once via `ZipKit.load()` and call * {@link import('./zipkit.js').ZipKit.pack}. * * @example * ```ts * import { pack, unpack } from '@myrialabs/zipkit'; * const small = await pack(bytes); * const orig = await unpack(small); * ``` */ export declare function pack(data: Uint8Array): Promise; /** Reverse {@link pack}. Async; lazily loads the shared engine. */ export declare function unpack(data: Uint8Array): Promise; //# sourceMappingURL=pack.d.ts.map