Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

give deflate::State::sym_buf its own allocation #27

Merged
merged 5 commits into from
Feb 12, 2024
Merged

Conversation

folkertdev
Copy link
Collaborator

The zlib-ng implementation overlaps pending_buf and sym_buf in the same allocation. The end of pending_buf will eventually cross over the initial start of sym_buf. Hence we can't really make this safe.

Giving sym_buf its own allocation is a simple solution, and does use more memory. But I think the alternative of some custom abstraction over the combined pending_buf/sym_buf would be very fragile. I think this is the better solution for now.

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (d3f7de1) 81.07% compared to head (d46ec3d) 81.29%.

Files Patch % Lines
zlib-rs/src/deflate/algorithm/fast.rs 0.00% 1 Missing ⚠️
zlib-rs/src/deflate/algorithm/huff.rs 0.00% 1 Missing ⚠️
zlib-rs/src/deflate/algorithm/medium.rs 0.00% 1 Missing ⚠️
zlib-rs/src/deflate/algorithm/rle.rs 0.00% 1 Missing ⚠️
zlib-rs/src/deflate/algorithm/slow.rs 0.00% 1 Missing ⚠️
zlib-rs/src/deflate/pending.rs 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
+ Coverage   81.07%   81.29%   +0.21%     
==========================================
  Files          28       28              
  Lines        6563     6569       +6     
==========================================
+ Hits         5321     5340      +19     
+ Misses       1242     1229      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@folkertdev folkertdev merged commit 0cfea67 into main Feb 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants