createDecompressStream
createDecompressStream(
maxOutputSize?):TransformStream<ArrayBufferLike|ArrayBufferView<ArrayBufferLike>,Uint8Array<ArrayBufferLike>>
Defined in: streams.d.ts:218
Create a streaming auto-detect decompression TransformStream.
Detects the compression format (zstd, gzip, brotli, or lz4) like
detectFormat and delegates to the appropriate decompression context.
Raw deflate is not supported (no magic bytes to distinguish it).
The input is buffered until the format is detected: up to 64 KiB, or the whole input if it is shorter, since brotli has no magic bytes and its detection may need that much. The stream errors if the format is still unknown then.
The stream errors on empty input, which has no format to detect, and on zstd, gzip or brotli input that ends before the compressed stream does.
Input chunks may be any ArrayBuffer, SharedArrayBuffer or ArrayBufferView,
read byte for byte: a Uint16Array is not converted element by element.
Parameters
Section titled “Parameters”maxOutputSize?
Section titled “maxOutputSize?”number
Maximum decompressed output size in bytes. Default is 256 MB.
Returns
Section titled “Returns”TransformStream<ArrayBufferLike | ArrayBufferView<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>