zlib compressionobj use: what am I missing?
t at chabry.caltech.edu
Thu Aug 16 23:08:38 CEST 2001
Hi all, I'm working on a patch to the zlibmodule, but I can't get this
bit of code for testing compression objects to work at all. Should it?
If not, what am I doing wrong??
file = open('to-compress')
compobj = zlib.compressobj(1)
compdata = ''
data = file.read(1000)
compdata += compobj.compress(data)
compdata += compobj.flush()
ps note that this is being run against Python 2.2 from CVS, but the zlibmodule
hasn't changed for a while, so 2.1 users should have the same version I'm
More information about the Python-list