Message266747
| Author | Vladimir Mihailenco |
|---|
| Recipients | Vladimir Mihailenco |
|---|
| Date | 2016-05-31.09:41:03 |
|---|
| SpamBayes Score | -1.0 |
|---|
| Marked as misclassified | Yes |
|---|
| Message-id | <1464687663.75.0.126366287594.issue27164@psf.upfronthosting.co.za> |
|---|
| In-reply-to | |
|---|
| Content |
|---|
Consider following code:```import zlibhello = 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)print(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 -https://golang.org/pkg/compress/flate/#NewWriterDict |
| History |
|---|
| Date | User | Action | Args |
|---|
| 2016-05-31 09:41:03 | Vladimir Mihailenco | set | recipients: +Vladimir Mihailenco | | 2016-05-31 09:41:03 | Vladimir Mihailenco | set | messageid: <1464687663.75.0.126366287594.issue27164@psf.upfronthosting.co.za> | | 2016-05-31 09:41:03 | Vladimir Mihailenco | link | issue27164 messages | | 2016-05-31 09:41:03 | Vladimir Mihailenco | create | |
|