kinetex - v1.4.0
    Preparing search index...

    Function decompressBodyStream

    • Apply content-encoding decompression to a raw body stream. Dynamically imports response.ts so that environments that don't use decompression don't pay the code cost. The import is cached by the runtime.

      Supported encodings: gzip, deflate, br (brotli), zstd. Unsupported encodings are passed through compressed; the caller must handle them.

      Parameters

      • body: ReadableStream<Uint8Array<ArrayBufferLike>> | null

        Raw body stream (or null)

      • headers: Record<string, string>

        Response headers (content-encoding is read and stripped on success)

      Returns Promise<ReadableStream<Uint8Array<ArrayBufferLike>> | null>

      Decompressed body stream, null for null input, or original body for identity/unsupported