createBrotliCompressDictStream
createBrotliCompressDictStream(
dict,quality?):TransformStream<ArrayBufferLike|ArrayBufferView<ArrayBufferLike>,Uint8Array<ArrayBufferLike>>
Defined in: streams.d.ts:125
Create a streaming brotli compression TransformStream with a custom dictionary.
Uses the Web Streams API (TransformStream) to provide chunked compression
with a custom dictionary for improved compression of similar data. It
holds up to the first 4 MiB less 16 bytes (4,194,288 bytes) of the input,
and compresses an input that ends there into the output of
brotliCompressWithDict(). Past them, the stream emits compressed output
as the input arrives, still with the dictionary.
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”Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>
Custom dictionary bytes.
quality?
Section titled “quality?”number
Compression quality (0-11). Default is 6.
Returns
Section titled “Returns”TransformStream<ArrayBufferLike | ArrayBufferView<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>