jnovy/pxz

Missing byte when compressing and decompressing pxz -9

Opened this issue · 0 comments

pxz --version
Parallel PXZ 4.999.9beta (build 20160729)
xz (XZ Utils) 4.999.9beta
liblzma 4.999.9beta

Here is the test I have performed.

ls -l test1
-rw-r--r-- 1 stadel ics 223696277 Dec 21 13:25 test1
xz -9k test1
ls -l test1.xz
-rw-r--r-- 1 stadel ics 145765216 Dec 21 13:25 test1.xz
rm test1
xz -dk test1.xz
ls -l test1
-rw-r--r-- 1 stadel ics 223696277 Dec 21 13:25 test1

So at least with xz, no issues...Now with pxz:

cp test1 test2
pxz -9k test2
ls -l test2*
-rw-r--r-- 1 stadel ics 223696277 Dec 21 13:56 test2
-rw-r--r-- 1 stadel ics 145818776 Dec 21 13:56 test2.xz
rm test2
xz -dk test2.xz
ls -l test2*
-rw-r--r-- 1 stadel ics 223696276 Dec 21 13:56 test2

Note we now are missing the last byte! Ok, but just to make sure, let's use pxz to decompress again:

rm test2
pxz -dk test2.xz
ls -l test2*
-rw-r--r-- 1 stadel ics 223696276 Dec 21 14:02 test2
-rw-r--r-- 1 stadel ics 145818776 Dec 21 14:02 test2.xz

Once again, even using purely pxz forward and backward we have lost one byte, which does not happen with xz. Any ideas what might be going on? Seems a serious problem!

cmp test1 test2
test1 test2 differ: byte 149130851, line 648575

Looks like somewhere in the middle is missing the byte with value 161

149130851 161 130
149130852 130 266
149130853 266 65
149130854 65 202
149130855 202 323
149130856 323 232
149130857 232 101
149130858 101 233
149130859 233 306
149130860 306 124
149130861 124 266
149130862 266 120
149130863 120 10
149130864 10 314
149130865 314 75
149130866 75 223
149130867 223 16
149130868 16 25
149130869 25 105
149130870 105 314
149130871 314 150
149130872 150 267
149130873 267 310