import { Binary } from "../types.js"; /** Detect gzip via magic header (0x1F 0x8B). */ export declare function isGzip(buf: Binary): boolean; /** Detect zlib via common CMF/FLG bytes (0x78 0x01/0x9C/0xDA). */ export declare function isZlib(buf: Binary): boolean; /** Detect zip via magic header "PK\x03\x04". */ export declare function isZip(buf: Binary): boolean; /** * Converts a possibly-compressed buffer to text (UTF-8). * Supports: gzip, zlib/deflate, zip (takes the first file entry). * Falls back to raw UTF-8 if no known compression is detected. */ export declare function maybeDecompressToText(buf: Binary): Promise; /** * Optionally compress a Buffer. * - If opts.gzip is true, returns a gzip-compressed Buffer. * - If opts.zip is true, throws unless zip support is added (JSZip or similar). * - Otherwise, returns the input unmodified. */ export declare function maybeCompress(buf: Uint8Array, opts?: { gzip?: boolean; zip?: boolean; }): Promise; //# sourceMappingURL=compression.d.ts.map