kinetex - v1.0.0-rc.1
    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) Unsupported encodings (zstd, etc.) are passed through compressed; caller must handle or error.

      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