Message171059
| Author |
nadeem.vawda |
| Recipients |
christian.heimes, eric.araujo, nadeem.vawda |
| Date |
2012年09月23日.16:46:33 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1348418795.08.0.401605495281.issue15955@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|