Gabriel, et al. It's hard to find a web site that uses deflate these days.
Luckily, slashdot to the rescue. I even wrote a test script. If someone can tell me what's wrong that would be great. Here's what I get when I run it: Data is compressed using deflate. Length is: 107160 Traceback (most recent call last): File "my_deflate_test.py", line 19, in <module> data = zlib.decompress(data) zlib.error: Error -3 while decompressing data: incorrect header check And here's my test script: #!/usr/bin/env python import urllib2 import zlib opener = urllib2.build_opener() opener.addheaders = [('Accept-encoding', 'deflate')] stream = opener.open('http://www.slashdot.org') data = stream.read() encoded = stream.headers.get('Content-Encoding') if encoded == 'deflate': print "Data is compressed using deflate. Length is: ", str(len(data)) data = zlib.decompress(data) print "After uncompressing, length is: ", str(len(data)) else: print "Data is not deflated." On Sep 10, 12:50 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 09 Sep 2008 16:38:54 -0300, Sam <[EMAIL PROTECTED]> escribió: > > > Un-deflating doesn't work. I get "zlib.error: Error -3 while > > decompressing data: incorrect header check" > > zlib.decompress should work - can you provide a site that usesdeflateto > test? -- http://mail.python.org/mailman/listinfo/python-list