mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
[PR #448] Python: Support streamed compression with the Compressor object #1070
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/google/brotli/pull/448
State: closed
Merged: Yes
Add
flushandfinishmethods to theCompressorobject inthe extension module and change
compressto only process data.Now, one or more
compresscalls followed by afinishcallwill be equivalent to a module-level
compresscall.Note: To maximize the compression efficiency (and match
underlying Brotli behavior, the
Compressorobjectcompressmethod does not guarantee all input is immediately written to
output. To ensure immediate output, call
flushto manuallyflush the compression buffer. Extraneous flushing can increase
the size, but may be required when processing streaming data.
edited Oct 19: see updated description in commit and the thread below