[Python-Dev] zlib module doesn't build - inflateCopy() not found

"Martin v. Löwis" martin at v.loewis.de
Sun May 21 12:01:44 CEST 2006


Guido van Rossum wrote:
> What was the purpose of the patch in the first place?

I don't fully understand it. I guess the objective of the patch
was to expose the feature of the underlying library. The SF
submission then gives the rationale for that feature as

"""
Copying a
(de)compression object allows a developer to store the
state of the (de)compressor at a certain point of the
input stream in order to more efficiently compress data
sharing some identical header, or to more efficiently
seek inside compressed data.
"""

The submitter first posted this message to c.l.p:

http://groups.google.com/group/comp.lang.python/msg/13f8ce4057162ad5

Apparently, one application is to take a snapshot of a gzip
file that is being created, then add to it, and if that fails
(e.g. because the size of the CD would be exceeded), truncate
it to back to the snapshot (and then close the zlib stream).

Regards,
Martin




More information about the Python-Dev mailing list