[issue15955] gzip, bz2, lzma: add method to get decompressed size

2012-09-25 Thread Christian Heimes
Christian Heimes added the comment: I've checked the implementation of the gzip command. It uses some tricks to get the result size of a compressed file. The bzip2 command doesn't have the ability. lzmainfo can print the actual size of the file but it says Unknown for my test file. Also see

[issue15955] gzip, bz2, lzma: add method to get decompressed size

2012-09-23 Thread Nadeem Vawda
Nadeem Vawda added the comment: 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

[issue15955] gzip, bz2, lzma: add method to get decompressed size

2012-09-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15955 ___ ___ Python-bugs-list

[issue15955] gzip, bz2, lzma: add method to get decompressed size

2012-09-17 Thread Christian Heimes
New submission from Christian Heimes: The gzip, bz2 and lzma file reader have no method to get the actual size and compression ratio of a compressed file. In my opinion it's useful to know how much disk space a file will need before it's decompressed. -- components: Library (Lib)