whatwg / compression

Compression Standard
https://compression.spec.whatwg.org/
Other
82 stars 21 forks source link

Add the concept of a "compression context" #19

Closed ricea closed 4 years ago

ricea commented 4 years ago

Add a "compression context" to CompressionStream and DecompressionStream to make the tracking of the internal state explicit.

ricea commented 4 years ago

Fixes #11.

CanonMukai commented 4 years ago

Specifically, what kind of value does a compression context take?

ricea commented 4 years ago

Specifically, what kind of value does a compression context take?

For example, with inflate in decompression mode it would consist of the last 32KB of decompressed output (so that back-references can be resolved), and any compressed input that has not yet been consumed.

It is difficult to be specific in the specification, but I have added some clarifying text. PTAL.