[Zlib-devel] pigz 2.1.4 output differs for -p 1 and -p 2
wpilorz at gmail.com
wpilorz at gmail.com
Thu Nov 13 17:40:20 EST 2008
I was running some tests with pigz on Linux, i386 (CentOS5, Fedora8),
compressing data on pipe, like that:
find some_directory -type f -print0 | env LANG=C sort -z | xargs -r0 cat | ./pigz -1 -n -T -i -p 1 | md5sum
some_directory contained 40 - 500 MB of data in several files, no modifications during test
If I replace -p 1 with -p 2 , -p 4 or whatever value > 1
the result is different.
To check how much different, I run xdelta as follows:
xdelta delta -0 -p output1 output2 xdelta_result
-p (pristine) means xdelta does not decompress gzip data before computing delta
-0 means xdelta does not compress resulting delta file
the size of delta file (20-40 % of compressed data) shows the differences
are not cosmetic only:
$ ls -l /dev/shm/pigztest_p2.dat /dev/shm/pigztest_p1.dat /dev/shm/pigztest_p1_p2_dat.xdelta
-rw-rw-r-- 1 wp wp 18298104 lis 13 23:21 /dev/shm/pigztest_p1.dat
-rw-rw-r-- 1 wp wp 4549555 lis 13 23:22 /dev/shm/pigztest_p1_p2_dat.xdelta
-rw-rw-r-- 1 wp wp 18297408 lis 13 23:21 /dev/shm/pigztest_p2.dat
The size of decompressed data here is 48645597 bytes.
(Each *.dat file decompress correctly to original data )
My question is whether this is expected behaviour that pigz produces
different compressed output when -p 1 and -p n with n > 1 is used, even with -i?
Best regards,
Wojtek
More information about the Zlib-devel
mailing list