Repository navigation
feat: Add settings for Codec::Deflate - #174
Merged
Merged
Conversation
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
…when it is needed Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
At the moment it could be used to specify the compression level for Codec::Deflate Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Add some Rustdoc Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
| let compressed = miniz_oxide::deflate::compress_to_vec(stream, 6); | ||
| Codec::Deflate(settings) => { | ||
| let compressed = | ||
| miniz_oxide::deflate::compress_to_vec(stream, settings.compression_level as u8); |
There was a problem hiding this comment.
Casting the compression level enum to u8 may be brittle if the underlying representation or expected type changes; consider adding a conversion method on DeflateSettings to ensure safe and explicit conversion.
Suggested change
| miniz_oxide::deflate::compress_to_vec(stream, settings.compression_level as u8); | |
| miniz_oxide::deflate::compress_to_vec(stream, settings.to_u8()); |
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
…el to u8 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.
No description provided.