-
-
Notifications
You must be signed in to change notification settings - Fork 29
3.0.0: Add zlib compression behind zlib feature
#155
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
base: 3.0.0
Are you sure you want to change the base?
Conversation
|
Hi @marvin-j97 , |
See the last remaining comment about the |
|
Hi @marvin-j97 Marvin, |
|
Oops the review was not sent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just rustfmt missing I think
This PR adds support for
Zlib(level)gated by the optionalzlibCargo feature.Changes
CompressionType
Zlib(u8).Encode/Decode:0..=9on encode/decode to matchflate2expectations.Block I/O
write_into,from_reader, andfrom_file.flate2::write::ZlibEncoder.flate2::read::ZlibDecoder.Blob path
blob_tree/compression.rs:MyCompressoradded support for zlibblob_tree/mod.rs:BlobTree::open()wiresCompressionType::{None, Lz4, Zlib(_)}.Cargo.toml
flate2withzlib-rsbackend (default-features = false).zlibfeature that enables the dependency.No breaking changes when i ran cargo build --features zlib and cargo test --features zlib
One open point: I clamped levels ≥10 to 9 during encode. Would you prefer rejecting invalid levels instead?