Skip to content

StreamContextOptions

Defined in: index.d.ts:1627

Options of a stream context.

Lz4DecompressContext and BrotliCompressDictContext take them.

optional incremental?: boolean

Defined in: index.d.ts:1641

Process the input as it arrives rather than hold it.

With incremental: true, Lz4DecompressContext.transform() returns each LZ4 block once all of it has arrived, flush() returns nothing more, and maxOutputSize limits the output of the whole stream; BrotliCompressDictContext holds at most the first 4 MiB less 16 bytes of input (4,194,288 bytes), then compresses each chunk as it arrives. Without it, the context keeps the behaviour that it has always had. The stream helpers of @derodero24/comprs/streams and @derodero24/comprs/node set it.