[Python-Dev] Copying zlib compression objects

Chris AtLee chris at atlee.ca
Wed Feb 22 16:40:05 CET 2006


On 2/17/06, Guido van Rossum <guido at python.org> wrote:
>
> Please submit your patch to SourceForge.


I've submitted the zlib patch as patch #1435422.  I added some test cases to
test_zlib.py and documented the new methods.  I'd like to test my gzip /
tarfile changes more before creating a patch for it, but I'm interested in
any feedback about the idea of adding snapshot() / restore() methods to the
GzipFile and TarFile classes.

It doesn't look like the underlying bz2 library supports copying compression
/ decompression streams, so for now it's impossible to make corresponding
changes to the bz2 module.

I also noticed that the tarfile reimplements the gzip file format when
dealing with streams.  Would it make sense to refactor some the gzip.py code
to expose the methods that read/write the gzip file header, and have the
tarfile module use those methods?

Cheers,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20060222/28bea403/attachment.htm 


More information about the Python-Dev mailing list