Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gzip original file size.

Status
Not open for further replies.

sebsauvage

Programmer
Oct 21, 2002
54
FR
Hello !

I'm using the gzip module of Python.
I'm trying to know the original size of a file compressed in .gz.

How could I do this ?

Do I have to perform GzipFile()/seek(0,2)/tell() to know the original file size ? <yuk!>
Do I have to parse myself the gzip header ? <grin>
Or is there a smarter way of doing this ?

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top