Re: Decompression with zlib

2009-04-08 Thread Scott David Daniels
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)

Re: Decompression with zlib

2009-04-08 Thread Albert Hopkins
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... >

Decompression with zlib

2009-04-08 Thread Emma Li
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