Skip to content

Commit 6fbd6d2

Browse files
authored
Merge pull request #427 from ByteBaker/main
docs: fix compression level range from 0-9 to 0-10
2 parents f6b4c60 + 936aa35 commit 6fbd6d2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ impl Compression {
192192
///
193193
/// The integer here is typically on a scale of 0-9 where 0 means "no
194194
/// compression" and 9 means "take as long as you'd like".
195+
///
196+
/// It is worth noting that `flate2` supports both `zlib` and `miniz`
197+
/// backends for compression, where `miniz` also provides a level `10` of
198+
/// compression.
195199
pub const fn new(level: u32) -> Compression {
196200
Compression(level)
197201
}
@@ -213,7 +217,7 @@ impl Compression {
213217
}
214218

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

0 commit comments

Comments
 (0)