bz2 module doesn't work properly with all bz2 files

Cameron Simpson cs at zip.com.au
Fri Jun 4 18:05:20 EDT 2010


On 04Jun2010 12:53, Magdoll <magdoll 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 <cs at zip.com.au> DoD#743
http://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



More information about the Python-list mailing list