Repository navigation
Use miniz_oxide - a better DEFLATE backend - #169
Merged
Merged
Conversation
martin-g
reviewed
Apr 1, 2025
martin-g
reviewed
Apr 1, 2025
Co-authored-by: Martin Grigorov <[email protected]>
martin-g
reviewed
Apr 1, 2025
| .finish() | ||
| .into_result() | ||
| .map_err(Error::DeflateCompressFinish)?; | ||
| let compressed = miniz_oxide::deflate::compress_to_vec(stream, 6); |
Member
There was a problem hiding this comment.
What is '6' here?
The compression level ?
Could we introduce settings like the other impls ?
Contributor
Author
There was a problem hiding this comment.
Yes, that is the compression level. Making it configurable is a good idea.
I kept the API the same in this PR to get the performance improvements to users without requiring them to change any code. Adding this configuration would be a good follow-up.
martin-g
approved these changes
Apr 1, 2025
Member
|
Thank you for the contribution, @Shnatsel ! |
martin-g
added a commit
that referenced
this pull request
Apr 7, 2025
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
martin-g
added a commit
that referenced
this pull request
Apr 7, 2025
…when it is needed Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
martin-g
added a commit
that referenced
this pull request
Apr 9, 2025
* Issue #169 - Be explicit about the used features of miniz_oxide Signed-off-by: Martin Tzvetanov Grigorov <[email protected]> * Issue #169 - Do not allow unused imports. Import only what is needed when it is needed Signed-off-by: Martin Tzvetanov Grigorov <[email protected]> * Fixes #173 - Introduce DeflateSettings At the moment it could be used to specify the compression level for Codec::Deflate Signed-off-by: Martin Tzvetanov Grigorov <[email protected]> * Issue #173 - Use non-default compression level for Codec::Deflate Add some Rustdoc Signed-off-by: Martin Tzvetanov Grigorov <[email protected]> * Issue #173 - Update the README.md with `cargo rdme` Signed-off-by: Martin Tzvetanov Grigorov <[email protected]> * Issue #173 - Fix Rustdoc imports Signed-off-by: Martin Tzvetanov Grigorov <[email protected]> * Issue #173 - Introduce a helper method for the cast of CompressionLevel to u8 Signed-off-by: Martin Tzvetanov Grigorov <[email protected]> * Issue #173 - Further rustdoc import fixes Signed-off-by: Martin Tzvetanov Grigorov <[email protected]> --------- Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch from libflate to miniz_oxide as the DEFLATE backend.
miniz_oxide is faster and more widely tested. It is the default backend for the de-facto standard flate2 crate, and has 10x the amount of downloads compared to libflate.
I've taken care to preserve the same public API so that this change would be transparent to users.