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 xiang.zhang
Recipients Vladimir Mihailenco, gregory.p.smith, martin.panter, nadeem.vawda, twouters, xiang.zhang
Date 2016-06-02.05:59:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thanks for your review, Martin. :) I have replied with after thinking and try.

Yes, this is more like a feature request. But for the end user, this behaviour is quite like a bug.

> If we were to add full support of inflateSetDictionary() for raw deflate mode, I imagine it would be a new decompressobj.set_dictionary() method.

I don't support adding a new set_dictionary() method. Right now decompressobj handles raw deflate format, zlib format and gzip format. Adding a set_dictionary() method for raw deflate format seems weird. If we are going to do so, I suggest reorganize the zlib like PHP and nodejs do, separating different formats into different objects.

> I did some quick tests with specifying an unnecessary zdict buffer to the decompressor (when zdict not used for compression), and it doesn’t _seem_ to break anything, but I am not 100% sure.

This patch only affects raw inflate. You have to set wbits negative. If you are decompressing with an unnecessary zdict, I think it ought to emit an error.

With Python background, zlib dictionary is really hard to understand. I think manual doesn't tell much. I understand why zdict is needed until reading
Date User Action Args
2016-06-02 05:59:08xiang.zhangsetrecipients: + xiang.zhang, twouters, gregory.p.smith, nadeem.vawda, martin.panter, Vladimir Mihailenco
2016-06-02 05:59:08xiang.zhangsetmessageid: <>
2016-06-02 05:59:08xiang.zhanglinkissue27164 messages
2016-06-02 05:59:08xiang.zhangcreate