From ef2c31fc7203fee241e5b2f6763827dcc8c60e5c Mon Sep 17 00:00:00 2001 From: Jonathan Behrens Date: Sat, 30 Nov 2024 23:39:51 -0800 Subject: [PATCH] Properly initialize eof_bits, eof_code, and eof_mask for fixed blocks (#41) --- src/decompress.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/decompress.rs b/src/decompress.rs index e23d5ee..baba376 100644 --- a/src/decompress.rs +++ b/src/decompress.rs @@ -242,6 +242,9 @@ impl Decompressor { for chunk in self.compression.dist_table.chunks_exact_mut(32) { chunk.copy_from_slice(&FIXED_DIST_TABLE); } + self.compression.eof_bits = 7; + self.compression.eof_code = 0; + self.compression.eof_mask = 0x7f; } self.state = State::CompressedData;