Skip to content

custom gzip stream implementation - #95

Draft
austin-weeks wants to merge 5 commits into
mainfrom
gzip-optimization
Draft

custom gzip stream implementation#95
austin-weeks wants to merge 5 commits into
mainfrom
gzip-optimization

Conversation

@austin-weeks

@austin-weeks austin-weeks commented Aug 13, 2026

Copy link
Copy Markdown
Owner

This ditches the async_compression rate for a custom implementation using zlib-rs.

Benchmarks

At 500 sustained concurrent requests:
The existing implementation peaks at 362M memory usage.
This branch's implementation (with level 9, window bits 11, and memory level 3), peaks at 164M memory usage.
The resulting compression ratio is only slight worse (less than 10%), while memory is reduced by 55%!

@austin-weeks austin-weeks added enhancement Improvements to existing functionality feature New feature or functionality labels Aug 13, 2026
@austin-weeks austin-weeks self-assigned this Aug 13, 2026
@austin-weeks

austin-weeks commented Aug 13, 2026

Copy link
Copy Markdown
Owner Author

This requires trifectatechfoundation/zlib-rs#556 to be accepted and merged

Update: PR has been merged! Now waiting on the change to be released, as crates.io will not allow me to release this change with a patched dependency.

@austin-weeks austin-weeks linked an issue Aug 15, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvements to existing functionality feature New feature or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce gzip memory usage

1 participant