Skip to content

createBrotliDecompressDictStream

createBrotliDecompressDictStream(dict, maxOutputSize?): TransformStream<ArrayBufferLike | ArrayBufferView<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>

Defined in: streams.d.ts:141

Create a streaming brotli decompression TransformStream with a custom dictionary.

Uses the Web Streams API (TransformStream) to provide chunked decompression with a custom dictionary. The same dictionary used for compression must be provided.

The stream errors if the input ends before the compressed stream does, including empty input.

Input chunks may be any ArrayBuffer, SharedArrayBuffer or ArrayBufferView, read byte for byte: a Uint16Array is not converted element by element.

Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>

Custom dictionary (must match the one used for compression).

number

Maximum decompressed output size in bytes. Default is 256 MB.

TransformStream<ArrayBufferLike | ArrayBufferView<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>