Movatterモバイル変換


[0]ホーム

URL:


homepage

Message266747

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

AuthorVladimir Mihailenco
RecipientsVladimir Mihailenco
Date2016-05-31.09:41:03
SpamBayes Score-1.0
Marked as misclassifiedYes
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
DateUserActionArgs
2016-05-31 09:41:03Vladimir Mihailencosetrecipients: +Vladimir Mihailenco
2016-05-31 09:41:03Vladimir Mihailencosetmessageid: <1464687663.75.0.126366287594.issue27164@psf.upfronthosting.co.za>
2016-05-31 09:41:03Vladimir Mihailencolinkissue27164 messages
2016-05-31 09:41:03Vladimir Mihailencocreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp