bunzip2 fails to decompress pbzip2-compressed files

Denys Vlasenko vda.linux at googlemail.com
Thu Oct 28 21:10:35 UTC 2010


On Friday 22 October 2010 20:07, Dan Fandrich wrote:
> pbzip2 is a parallel bzip2 compressor that uses multiple threads while
> compressing to linearly speed bzip2 compression by the number of cores
> available (see http://compression.ca/pbzip2/). The files it produces
> are compatible with traditional bzip2, but have slightly different output
> because of the way the independently-compressed blocks are concatenated.
> 
> Unfortunately, this seems to prevent Busybox's bunzip2 from decompressing
> them fully. Busybox decompresses the first block, then silently stops without
> indicating any sort of error.  It can be reproduced like this:
> 
> $ cp /lib/libc-2.9.so bigfile   #need a file larger than 900K
> $ pbzip2 -9 bigfile
> $ bzcat bigfile.bz2 | wc -c
> 1331404
> $ busybox bzcat bigfile.bz2 | wc -c
> 900000
> $ busybox bunzip2 bigfile.bz2
> $ echo $?
> 0
> $ stat -c %s bigfile
> 900000

Please try attached patch
-- 
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7.patch
Type: text/x-diff
Size: 7648 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20101028/f35c69fd/attachment-0001.bin>


More information about the busybox mailing list