mirror of
https://github.com/google/brotli.git
synced 2026-09-23 07:05:31 +00:00
[PR #448] [MERGED] Python: Support streamed compression with the Compressor object #1067
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?
📋 Pull Request Information
Original PR: https://github.com/google/brotli/pull/448
Author: @nicksay
Created: 10/18/2016
Status: ✅ Merged
Merged: 10/24/2016
Merged by: @eustas
Base:
master← Head:py-4-compressor-multi📝 Commits (1)
cc27fa8Python: Support streamed compression with the Compressor object📊 Changes
2 files changed (+135 additions, -33 deletions)
View changed files
📝
python/_brotli.cc(+133 -31)📝
python/brotli.py(+2 -2)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.