/** * Upper bound on decompressed/buffered response bodies, shared by zlib's * `maxOutputLength` here and by the raw response-chunk buffering in * global-monitor.ts / RequestMonitoringService.ts. Caps decompression-bomb * amplification and unbounded in-memory buffering to a single sane number. */ declare const MAX_DECOMPRESSED_BYTES: number; /** * Decompresses a response buffer according to its Content-Encoding. * Handles gzip, x-gzip, deflate (RFC 1950 with raw RFC 1951 fallback), and br. * Unknown or absent encodings are returned as-is (UTF-8 string). * Falls back to the raw UTF-8 string when zlib is unavailable (Edge runtime). * * @param onWarn Optional callback for decompression failure warnings. */ declare function decompressBuffer(buffer: Buffer, encoding: string | undefined, onWarn?: (msg: string) => void): Promise; export { MAX_DECOMPRESSED_BYTES, decompressBuffer };