/** * Web-standard `TransformStream` wrappers for every codec, so ZipKit drops into * any `pipeThrough()` pipeline (`fetch` bodies, files, sockets). * * gzip / zlib / raw-deflate are backed by the platform's native * `CompressionStream` / `DecompressionStream` when present (Node 18+, Bun, and * modern browsers) — true incremental streaming with no buffering. The other * codecs (zstd, lz4, snappy, brotli, lzma, bzip2) are one-shot in the engine, * so their streams buffer the input and compress on flush; this still composes * cleanly in a pipeline, it just isn't incremental. Pick gzip/zlib/deflate for * unbounded streams. * * @example * ```ts * import { compressionStream } from '@myrialabs/zipkit'; * await response.body * .pipeThrough(compressionStream('gzip')) * .pipeTo(writable); * ``` */ import type { Codec, CompressOptions, DecompressOptions } from '../types.js'; /** * A `TransformStream` that compresses with `codec`. Native and incremental for * gzip/zlib/deflate; buffered for every other codec. */ export declare function compressionStream(codec: Codec, opts?: CompressOptions): TransformStream; /** * A `TransformStream` that decompresses with `codec`. Native and incremental * for gzip/zlib/deflate; buffered for every other codec. */ export declare function decompressionStream(codec: Codec, opts?: DecompressOptions): TransformStream; //# sourceMappingURL=index.d.ts.map