Message171059
As far as I can tell, there is no way to find this out reliably without decompressing the entire file. With gzip, the file trailer contains the uncompressed size modulo 2^32, but this seems less than useful. It appears that the other two formats do not store the total uncompressed data size in any form.
For bz2 and lzma, one can get the uncompressed size by doing f.seek(0, 2) followed by f.tell(). However this approach is ugly and potentially very slow, so I would be reluctant to add a method based on it to the (BZ2|LZMA)File classes. |
|
Date |
User |
Action |
Args |
2012-09-23 16:46:35 | nadeem.vawda | set | recipients:
+ nadeem.vawda, christian.heimes, eric.araujo |
2012-09-23 16:46:35 | nadeem.vawda | set | messageid: <1348418795.08.0.401605495281.issue15955@psf.upfronthosting.co.za> |
2012-09-23 16:46:34 | nadeem.vawda | link | issue15955 messages |
2012-09-23 16:46:33 | nadeem.vawda | create | |
|