bzip2-rs
bzip2-rs copied to clipboard
BlockError: `huffman bitstream truncated`
This error occurs when I'm decoding an Android update payload. Dump file (not actually zipped, change extension to .bz2): dump.zip
let mut decoder = bzip2_rs::DecoderReader::new(input?);
// The next statement returns BlockError { reason: "huffman bitstream truncated" }
let copied = std::io::copy(&mut decoder, &mut output);
bzip2 = "0.4"
decoded this file successfully.
I'm experiencing the same problem using this file:
https://ftp.mozilla.org/pub/firefox/releases/89.0.2/linux-x86_64/en-US/firefox-89.0.2.tar.bz2
Here is a basic example reproducing the problem:
https://github.com/bonigarcia/rust-examples/blob/main/bzip2/src/main.rs