lzma-rs
lzma-rs copied to clipboard
Support multi-stream files
A new stream is allowed to start after the previous stream ends, according to the xz
spec. I'm not sure what the point of that is, but I'm trying to decode Packages.xz
files (part of the Debian package repository structure) and for some reason they have an extra zero-length stream at the end of file:
00150620 e9 8d 27 96 8d 26 27 1c 00 00 00 00 55 59 08 b9 |..'..&'.....UY..|
00150630 33 3c 6c 5d 00 01 a6 8c 54 ff 8b 95 03 00 00 00 |3<l]....T.......|
00150640 fb c4 02 a2 14 17 3b 30 03 00 00 00 00 04 59 5a |......;0......YZ|
00150650 fd 37 7a 58 5a 00 00 04 e6 d6 b4 46 00 00 00 00 |.7zXZ......F....|
00150660 1c df 44 21 1f b6 f3 7d 01 00 00 00 00 04 59 5a |..D!...}......YZ|
00150670
If I remove the last 16 bytes the file decompresses correctly, but otherwise I get an error.