bz2 module doesn't work properly with all bz2 files

Magdoll magdoll at gmail.com
Fri Jun 4 18:32:47 EDT 2010


On Jun 4, 3:05 pm, Cameron Simpson <c... at zip.com.au> wrote:
> On 04Jun2010 12:53, Magdoll <magd... at gmail.com> wrote:
> | I'm not sure what's causing this, but depending on the compression
> | program used, the bz2 module sometimes exits earlier.
> |
> | I used pbzip2 to compress my bz2 files and read through the file using
> | the bz2 module. The file descriptor always exits much earlier than
> | where the actual EOF is. If I use bzip2 instead of pbzip2 to compress
> | the files, then everything is fine.
> |
> | My files are generally big (several GBs) so decompressing them is not
> | a wise choice, and it is a little unfortunate that I can't use pbzip2
> | because it's usually much faster than bz2.
>
> Have you tested the decompression or the problematic files with the
> bunzip2 command? Just to ensure the bug is with the python bz2 module
> and not with the pbzip2 utility?
> --
> Cameron Simpson <c... at zip.com.au> DoD#743http://www.cskk.ezoshosting.com/cs/
>
> A lot of people don't know the difference between a violin and a viola, so
> I'll tell you.  A viola burns longer.   - Victor Borge

Yes. Decompressing them with either pbzip2 or bunzip2 are both fine.
So the problem is not with pbzip2.



More information about the Python-list mailing list