Determine whether STDIN is gzipped

Carsten Gaebler cg at schlund.de
Tue Jan 9 05:43:18 EST 2001


Andreas Jung wrote:

> 
> Something like the following should work (I assume we can read all
> data from STDIN in one read() call):
> 

Okay, I should have mentioned that I can't afford reading all data at
once into memory because if it is not gzipped it can be several ten megs
large and the program is intended to be run on a web server.

cg.



More information about the Python-list mailing list