Skip to content

Commit

Permalink
Merge pull request #427 from ByteBaker/main
Browse files Browse the repository at this point in the history
docs: fix compression level range from 0-9 to 0-10
  • Loading branch information
Byron authored Sep 24, 2024
2 parents f6b4c60 + 936aa35 commit 6fbd6d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ impl Compression {
///
/// The integer here is typically on a scale of 0-9 where 0 means "no
/// compression" and 9 means "take as long as you'd like".
///
/// It is worth noting that `flate2` supports both `zlib` and `miniz`
/// backends for compression, where `miniz` also provides a level `10` of
/// compression.
pub const fn new(level: u32) -> Compression {
Compression(level)
}
Expand All @@ -213,7 +217,7 @@ impl Compression {
}

/// Returns an integer representing the compression level, typically on a
/// scale of 0-9
/// scale of 0-9. With `miniz` backend, level 10 is also possible.
pub fn level(&self) -> u32 {
self.0
}
Expand Down

0 comments on commit 6fbd6d2

Please sign in to comment.