Boost C++ Libraries: Ticket #5898: bzip2_decompressor still does not handle pbzip2-compressed files correctly https://svn.boost.org/trac10/ticket/5898 <p> This is an extension of ticket <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3853" title="#3853: Bugs: bzip2_decompressor reads only one block of a pbzip2-created files (closed: fixed)">#3853</a>. I believe that the bug was not resolved correctly. In particular, there appears to be a subtle problem which occurs when the boundary between two bz streams falls at precisely the wrong place in the input buffer. </p> <p> The attached piece of code illustrates the problem. It may be compiled with, say: </p> <blockquote> <p> g++ testpbzip2.cc -o testpbzip2 -lboost_iostreams -lbz2 ./testpbzip2 </p> </blockquote> <p> The input file (which is inlined in the source file) was created using the following commands: </p> <p> dd if=/dev/zero of=file bs=1000 count=901 pbzip2 -9 file </p> <p> The problem was initially found on a real file with the default buffer size of 4096. The smallest example that I've found which exercises the problem at this buffer size is 160kB, and hence not attached to this ticket. It is available on request. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5898 Trac 1.4.3 Andrew.Bromage@… Wed, 14 Sep 2011 00:40:23 GMT attachment set https://svn.boost.org/trac10/ticket/5898 https://svn.boost.org/trac10/ticket/5898 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">testpbzip2.cc</span> </li> </ul> <p> Failing test case </p> Ticket