/** * Browser True Streaming Compression * * Uses native CompressionStream("deflate-raw") for real chunk-by-chunk streaming. * Falls back to buffered compression if not supported. * * Worker Pool: Optional off-main-thread streaming compression/decompression * to prevent UI blocking. * * API compatible with Node.js version - supports .on("data"), .on("end"), .write(callback), .end() */ import { SyncDeflater as PureJsSyncDeflater } from "./deflate-fallback.js"; import { hasWorkerSupport } from "./worker-pool/index.browser.js"; export type { DeflateStream, InflateStream, StreamingCodec, StreamCompressOptions, SyncDeflaterLike } from "./streaming-compress.base.js"; import { type DeflateStream, type InflateStream, type StreamCompressOptions } from "./streaming-compress.base.js"; export { hasWorkerSupport }; /** * Check if deflate-raw streaming compression is supported by this library. */ export declare function hasDeflateRaw(): boolean; /** * Create a streaming DEFLATE compressor */ export declare function createDeflateStream(options?: StreamCompressOptions): DeflateStream; /** * Create a streaming INFLATE decompressor */ export declare function createInflateStream(options?: StreamCompressOptions): InflateStream; export type GzipStream = DeflateStream; export type GunzipStream = InflateStream; export type ZlibStream = DeflateStream; export type UnzlibStream = InflateStream; /** Create a streaming GZIP compressor */ export declare function createGzipStream(options?: StreamCompressOptions): GzipStream; /** Create a streaming GZIP decompressor */ export declare function createGunzipStream(options?: StreamCompressOptions): GunzipStream; /** Create a streaming Zlib compressor */ export declare function createZlibStream(options?: StreamCompressOptions): ZlibStream; /** Create a streaming Zlib decompressor */ export declare function createUnzlibStream(options?: StreamCompressOptions): UnzlibStream; /** * Browser synchronous deflater — re-exports the pure-JS `SyncDeflater` * from deflate-fallback.ts which maintains a LZ77 sliding window and * bit-stream state across `write()` calls. */ export { PureJsSyncDeflater as SyncDeflater }; /** * Returns true when the browser supports native `CompressionStream("deflate-raw")`, * signalling that `push()` should prefer the async path over `SyncDeflater`. * * Only checks for compression support — decompression is not needed for writing. */ export declare function hasNativeAsyncDeflate(): boolean;