We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a58925 commit c78469eCopy full SHA for c78469e
libbz2-rs-sys/src/bzlib.rs
@@ -254,6 +254,9 @@ mod stream {
254
mut bit_buffer: u64,
255
bits_used: i32,
256
) -> Option<(u64, i32)> {
257
+ // we should only ask for more input if there are at least 8 free bits
258
+ debug_assert!(bits_used <= 56);
259
+
260
if self.avail_in < 8 {
261
return None;
262
}
@@ -289,6 +292,9 @@ mod stream {
289
292
290
293
291
294
295
296
297
298
if self.avail_in == 0 || bits_used > 56 {
299
300
0 commit comments