mirror of
https://github.com/google/brotli.git
synced 2026-04-06 06:03:43 +00:00
[PR #856] [CLOSED] Python: use a new output buffer code #1455
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/856
Author: @ghost
Created: 10/17/2020
Status: ❌ Closed
Base:
master← Head:block_output_buffer📝 Commits (10+)
ca2664d1. blocks output buffer6702fef2. brotli_decompress99f08693. compress_stream3e3c0d14. brotli_Compressor_process92252a85. brotli_Compressor_flushb8ec1226. brotli_Compressor_finish6abf03c7. decompress_streamb4475b28. brotli_Decompressor_process7c771a19. brotli_Decompressor_is_finishedbb3ae2210. no c++ code📊 Changes
2 files changed (+284 additions, -102 deletions)
View changed files
📝
python/_brotli.c(+260 -70)📝
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.
Benchmarks:
Benchmark code:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.