Problem using pbzip2 with bz2.BZ2File().read()
Ameet Nanda
ameet.nanda at gmail.com
Mon Jun 21 20:32:00 EDT 2010
When I compress a file with bzip2 from command line and read it with
*uncomp_data = bz2.BZ2File("fname").read()* , it reads the whole file into
uncomp_data.
However when I compress the file with pbzip2 from command line and read it
in a similar way* it just reads the block size of data* used for
compression.
So if I compress with:
*pbzip2 temp.temp -b3
*the read returns 300000 bytes of data*.
*I tried with various block sizes to confirm. Has it got something to do
with the block separator fields ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100621/bcbe8d0a/attachment.html>
More information about the Python-list
mailing list