property

BunFetchRequestInit.decompress

decompress?: boolean

Control automatic decompression of the response body. When false, the body is not decompressed and the Content-Encoding header is preserved. This can improve performance when you handle compressed data yourself or forward it as-is. Not part of the Fetch API specification.

// Disable automatic decompression for a proxy server
const response = await fetch("https://example.com/api", {
  decompress: false
});
// response.headers.get('content-encoding') might be 'gzip' or 'br'