uncompressed size of .gz file

Heiko Wundram heikowu at ceosg.de
Mon Sep 20 11:21:58 CEST 2004


Am Montag, 20. September 2004 07:32 schrieb frankabel:
> Just a question: in line "return struct.unpack("<i", f.read())[0]"
> I think that better will be "<I" instead "<i", but you are the guru :),
> please tell me if I'm wrong.

You should be fine using "<I", but I'd rather look out whether it's really 
always "<", as this means little-endian. I don't know whether gzipped files 
are always written as little endian (this would feel strange, as big-endian 
is the "portable way"), or whether they are dependent on the host platform 
they were generated on. I'd do some reading up on this before really fixing 
for a solution...

Heiko.



More information about the Python-list mailing list