Emma Li wrote:
Hello,
I'm trying to do compression/decompression of stuff with zlib, and I
just don't get it... Here is an example
Try this:
import zlib
compressor = zlib.compressobj(6) # level
cmpr = compressor.compress("a")
print "compressed: %d %r" % (len(cmpr), cmpr)
On Wed, 2009-04-08 at 23:51 +0200, Emma Li wrote:
> Hello,
>
> I'm trying to do compression/decompression of stuff with zlib, and I
> just don't get it...
> Here is an example. I assume that dec should be "a", but it isn't. dec
> turns out to be an empty string, and I don't understand why...
>
Hello,
I'm trying to do compression/decompression of stuff with zlib, and I
just don't get it...
Here is an example. I assume that dec should be "a", but it isn't. dec
turns out to be an empty string, and I don't understand why...
===
import zlib
compressor = zlib.compressob