vasi / pixz

Parallel, indexed xz compressor
BSD 2-Clause "Simplified" License
711 stars 61 forks source link

Decompression fails for concatenated archives: "Error reading block header size" #76

Closed fractal9 closed 6 years ago

fractal9 commented 6 years ago

Hello,

the xz file format allows for concatenation of compressed files. However, pixz fails to decompress those files.

# create two archives: big and small:
$ dd if=/dev/zero bs=1024 count=1000 | pixz -1 -t > 1.pixz
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.0022367 s, 458 MB/s

$ dd if=/dev/zero bs=10 count=10 | pixz -1 -t > 2.pixz
10+0 records in
10+0 records out
100 bytes (100 B) copied, 6.8074e-05 s, 1.5 MB/s

# decompression via plain xz works as expected:
$ cat 1.pixz 2.pixz | xz -d | wc -c
1024100

# decompression via pixz fails:
$ cat 1.pixz 2.pixz | pixz -t -d | wc -c
can not seek in input: Illegal seek
Error reading block header size
0

Tested with a version 4f079c3 directly taken from git.

Could you please have a look?

Thanks a lot!

/alex

fractal9 commented 6 years ago

Please close the issue -- I realized that "Illegal seek" is the problem here, not the concatenation.

Sorry bothering, and... thanks for maintaining such a nice tool!