[issue9664] Make gzip module not require that underlying file object support seek

2010-11-25 Thread Miroslav Suchý
Miroslav Suchý added the comment: I'm proposing GzipStream class which inherit from gzip.GzipFile and handle streaming gzipped data. You can use this module under both Python or GPLv2 license. We use this module under python 2.6. Not sure if it will work under Python3. -- nosy: +msu.

[issue9664] Make gzip module not require that underlying file object support seek

2010-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: It is possible that only a fixed-size buffer is needed. If so, use of an alternate read mechanism could be conditioned on the underlying file(like) object not having seek. It is also possible to direct a stream to a temporary file, but I think having the use

[issue9664] Make gzip module not require that underlying file object support seek

2010-09-07 Thread R. David Murray
R. David Murray added the comment: Matt: if you want to learn the file format and propose a patch, I think it would be OK for gzip to duck-type the file object and only raise an error when a seek is explicitly requested. After all, that's the way real file objects work. A quick glance at th

[issue9664] Make gzip module not require that underlying file object support seek

2010-09-02 Thread Matt Kraai
Matt Kraai added the comment: I don't know the gzip format well enough, but I was hoping that it would be possible to iterate through the lines of a gzip-compressed stream without having to use any of the functions that would require seeking. -- nosy: +kraai _

[issue9664] Make gzip module not require that underlying file object support seek

2010-08-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I do not think your wish is sensibly possible. GzipFile wraps an object that is or simulates a file. This is necessary because GzipFile "simulates most of the methods of a file object, with the exception of the readinto() and truncate() methods." Note that se

[issue9664] Make gzip module not require that underlying file object support seek

2010-08-23 Thread Matthias Klose
New submission from Matthias Klose : [ forwarded from http://bugs.debian.org/571317 ] "I'm writing a program that uses the popularity contest results. Since downloading the compressed results takes about a quarter of the time it takes to download the uncompressed results, I'd like to use the f