Skip to content

Feature request: add a "flush()" API #13

@ewildgoose

Description

@ewildgoose

Hi, I would like to use Brotli for compressing a stream of data. For this reason it's necessary to be able to "flush" the stream at the end of a frame (whatever the app is doing to frame the data stream).

The issue is that if the stream sends some number of bytes to the encoder, the encoder might not necessarily emit enough data to the output to allow the decoder to fully decode that input. A "flush" forces the encoder to empty it's state and transmit any pending data (it hurts compression performance, but emits the buffered data)

This extra API call would make the brotli library useful for a wider array of use cases.

Thanks for listening

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions