Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidInput on extracting a xz file #112

Open
crazystylus opened this issue Mar 11, 2023 · 1 comment · Fixed by Portable-Network-Archive/liblzma-rs#5
Open

InvalidInput on extracting a xz file #112

crazystylus opened this issue Mar 11, 2023 · 1 comment · Fixed by Portable-Network-Archive/liblzma-rs#5

Comments

@crazystylus
Copy link

Test code

fn main() {
    let test_xz = File::open("dump.xz").unwrap();
    let mut output = Vec::new();
    xz2::read::XzDecoder::new(&test_xz).read_to_end(&mut output).unwrap();
}

Output of above program

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidInput, error: Options }'

Output of xz -l dump.xz

Strms  Blocks   Compressed Uncompressed  Ratio  Check   Filename
    1       1    683.7 KiB  2,048.0 KiB  0.334  None    dump.xz

I am able to extract the xz file using unxz in linux but not with XzDecoder

Link to file (please extract the dump.zip to get xz file)
dump.zip

@crazystylus
Copy link
Author

Adding to this, I tried to extract the same archive using rust-lzma and received no such error or issue. This might be helpful with diagnosing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant