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
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
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15955
___
___
Python-bugs-list
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)