Type Alias DictionaryEncoder
DictionaryEncoder: (
dictionary: Uint8Array,
input: Uint8Array,
format: DictionaryFormat,
) => Promise<Uint8Array>
dictionary: Uint8Array,
input: Uint8Array,
format: DictionaryFormat,
) => Promise<Uint8Array>
Type Declaration
-
- (
dictionary: Uint8Array,
input: Uint8Array,
format: DictionaryFormat,
): Promise<Uint8Array> -
Parameters
- dictionary: Uint8Array
- input: Uint8Array
- format: DictionaryFormat
Returns Promise<Uint8Array>
- (
Compresses
inputagainstdictionaryand returns the compressed stream only. spool adds the coding's header (the magic bytes and the SHA-256 of the dictionary). Fordczthe dictionary is a raw content dictionary and the window must stay at or under 8 MiB or 1.25 times the dictionary, whichever is larger. Fordcbit is a Brotli prefix dictionary. It throws for a format it cannot produce, and the proxy then answers with the plain body.