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:35nadeem.vawdasetrecipients: + nadeem.vawda, christian.heimes, eric.araujo
2012-09-23 16:46:35nadeem.vawdasetmessageid: <1348418795.08.0.401605495281.issue15955@psf.upfronthosting.co.za>
2012-09-23 16:46:34nadeem.vawdalinkissue15955 messages
2012-09-23 16:46:33nadeem.vawdacreate