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

Add flushing support for gzip compressor #116

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

sidhant007
Copy link

@sidhant007 sidhant007 commented May 20, 2020

Uses Z_FULL_FLUSH at the point where flushing is done. Therefore it enables the user to read data between any two flush points.

Fixes 1656 for Gzip Filters. More context here

Relies on Z_BUF_ERROR to determine when to stop deflating.

@sidhant007 sidhant007 changed the title Add flushing support for gzip filter. Add flushing support for gzip filter May 20, 2020
@sidhant007 sidhant007 changed the title Add flushing support for gzip filter Add flushing support for gzip compressor May 21, 2020
@codecov
Copy link

codecov bot commented May 26, 2020

Codecov Report

Merging #116 into develop will increase coverage by 0.04%.
The diff coverage is 72.22%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #116      +/-   ##
===========================================
+ Coverage    68.96%   69.00%   +0.04%     
===========================================
  Files           80       80              
  Lines         3444     3462      +18     
  Branches      1027     1033       +6     
===========================================
+ Hits          2375     2389      +14     
+ Misses         452      451       -1     
- Partials       617      622       +5     
Impacted Files Coverage Δ
src/zlib.cpp 92.85% <ø> (ø)
include/boost/iostreams/filter/symmetric.hpp 71.87% <50.00%> (-2.55%) ⬇️
include/boost/iostreams/filter/gzip.hpp 60.85% <100.00%> (+0.46%) ⬆️
include/boost/iostreams/filter/zlib.hpp 75.00% <100.00%> (+2.11%) ⬆️
.../iostreams/detail/streambuf/indirect_streambuf.hpp 77.77% <0.00%> (ø)
.../iostreams/detail/adapter/non_blocking_adapter.hpp 76.47% <0.00%> (+5.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 601244b...c7230cc. Read the comment docs.

@sidhant007
Copy link
Author

Hey @jeking3, can you kindly review this PR

@R030t1
Copy link

R030t1 commented May 15, 2021

Yeet this please
It is preeminently yeetable

Worth noting, I guess, that you can use new/delete to force the desired behavior.

Any chance to generalize this for the other compressors? I'll have a look at how hard it is to add zstd.

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