Skip to content

Commit 5f9dc32

Browse files
committed
fix and clarify miniz_oxide level assert
1 parent 8cc9b0c commit 5f9dc32

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ffi/miniz_oxide.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,9 @@ impl From<FlushCompress> for MZFlush {
145145

146146
impl DeflateBackend for Deflate {
147147
fn make(level: Compression, zlib_header: bool, _window_bits: u8) -> Self {
148-
// Check in case the integer value changes at some point.
149-
debug_assert!(level.level() <= 9);
148+
// Check in case the integer value changes at some point. Unlike the other zlib
149+
// implementations, miniz_oxide actually has a compression level 10.
150+
debug_assert!(level.level() <= 10);
150151

151152
let mut inner: Box<CompressorOxide> = Box::default();
152153
let format = format_from_bool(zlib_header);

0 commit comments

Comments
 (0)