diff --git a/src/write.rs b/src/write.rs index acf9ac98..82764af6 100644 --- a/src/write.rs +++ b/src/write.rs @@ -287,7 +287,11 @@ impl<'a> arbitrary::Arbitrary<'a> for FileOptions<'a, ExtendedFileOptions> { }; #[cfg(feature = "deflate-zopfli")] if options.compression_method == CompressionMethod::Deflated && bool::arbitrary(u)? { - options.zopfli_buffer_size = Some(1 << u.int_in_range(9..=30)?); + options.zopfli_buffer_size = Some(1 << u.int_in_range(8..=29)? * if bool::arbitrary(u) { + 2 + } else { + 3 + }); } u.arbitrary_loop(Some(0), Some((u16::MAX / 4) as u32), |u| { options