This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Vladimir Mihailenco
Recipients Vladimir Mihailenco
Date 2016-05-31.09:41:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Consider following code:

import zlib

hello = b'hello'

# Compress data using deflate and shared/predefined dict.
co = zlib.compressobj(wbits=-zlib.MAX_WBITS, zdict=hello)
data = co.compress(hello) + co.flush()

# Decompress deflate by providing same dict.
do = zlib.decompressobj(wbits=-zlib.MAX_WBITS, zdict=hello)
data = do.decompress(data)


Decompression fails with "zlib.error: Error -3 while decompressing data: invalid distance too far back".

My original task was to decompress data I get from Golang library -
Date User Action Args
2016-05-31 09:41:03Vladimir Mihailencosetrecipients: + Vladimir Mihailenco
2016-05-31 09:41:03Vladimir Mihailencosetmessageid: <>
2016-05-31 09:41:03Vladimir Mihailencolinkissue27164 messages
2016-05-31 09:41:03Vladimir Mihailencocreate