mirror of
https://github.com/google/brotli.git
synced 2026-09-23 07:05:31 +00:00
[PR #901] [CLOSED] Python: use a new output buffer code #1476
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/901
Author: @ghost
Created: 5/2/2021
Status: ❌ Closed
Base:
master← Head:blocks_output_buffer_v2📝 Commits (10+)
77446361. blocks output bufferfac55d42. brotli_decompress9406ccd3. compress_stream6866df54. brotli_Compressor_process744a5215. brotli_Compressor_flushc40cf106. brotli_Compressor_finisha3cf80c7. decompress_stream3fb79668. brotli_Decompressor_processbde73539. brotli_Decompressor_is_finished369344210. no c++ code📊 Changes
2 files changed (+374 additions, -175 deletions)
View changed files
📝
python/_brotli.c(+350 -143)📝
setup.py(+24 -32)📄 Description
Currently, the output buffer is a
std::vector<uint8_t>.When the buffer grows, resizing will cause unnecessary
memcpy().This PR uses a list of bytes object to represent output buffer, can avoid the extra overhead of resizing.
In addition, C++ code can be removed, it's a pure C extension.
Please review the 11 commits one by one.
May 2, 2021 update:
Benchmarks:
Benchmark code:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.