I\'ve a memory- and disk-limited environment where I need to decompress the contents of a gzip file sent to me in string-based chunks (over xmlrpc binary transfer). However,
gzip and zlib use slightly different headers.
See How can I decompress a gzip stream with zlib?
Try d = zlib.decompressobj(16+zlib.MAX_WBITS).
d = zlib.decompressobj(16+zlib.MAX_WBITS)
And you might try changing your chunk size to a power of 2 (say CHUNKSIZE=1024) for possible performance reasons.
CHUNKSIZE=1024