[Boost-bugs] [Boost C++ Libraries] #3853: bzip2_decompressor reads only one block of a pbzip2-created files

Subject: [Boost-bugs] [Boost C++ Libraries] #3853: bzip2_decompressor reads only one block of a pbzip2-created files
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-01-21 08:49:39


#3853: bzip2_decompressor reads only one block of a pbzip2-created files
--------------------------------------------------+-------------------------
 Reporter: Darko Veberic <darko.veberic@…> | Owner: turkanis
     Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: iostreams
  Version: Boost 1.41.0 | Severity: Problem
 Keywords: |
--------------------------------------------------+-------------------------
 reading bz2 files created with parallel version "pbzip2" stops exactly
 after correctly decompressing the first bzip block (900k). this same bz2
 file is correctly decompressed by the non-parallel bunzip2 version so,
 imho the bzip2 filter should do the same or throw an exception if this is
 some kind of unrecognized format.

 i've been able to reproduce this bug with boost 1.35.1, 1.36.0, 1.40.0,
 1.41.0 so i guess it is present in all versions. the bug can be seen by
 running the attached programs:

   c++ spit.cc -o spit
   c++ test_bzip2_decompressor.cc -o test_bzip2_decompressor
   ./spit >test.txt
   bzip2 -c test.txt >test.txt.bz2
   pbzip2 -c test.txt >test.txt.parallel.bz2

 running
   ./test_bzip2_decompressor test.txt.bz2 | wc
 outputs correct 500 lines:
   500 250000 995395
 while
   ./test_bzip2_decompressor test.txt.parallel.bz2 | wc
 finds only 452 lines and only 900k in total:
   452 226164 900000

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3853>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC