[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-18 Thread Sam Rushing
Sam Rushing added the comment: I think other than the disagreement about whether the dictionary constructor arg should be a buffer object, it's good to go. To restate my position: the need is for an immutable string of bytes, and that's exactly what PyBytes_Type is for. I see no ad

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-05 Thread Sam Rushing
Sam Rushing added the comment: renames dict->zdict, splits the test, adds BEGIN/END around inflate call. -- Added file: http://bugs.python.org/file25472/zlib_set_dictionary_4.patch ___ Python tracker <http://bugs.python.org/issu

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Changes by Sam Rushing : Added file: http://bugs.python.org/file25449/zlib_set_dictionary_3.patch ___ Python tracker <http://bugs.python.org/issue14684> ___ ___ Python-bug

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing added the comment: Updated version of the patch: extends the test, including a test of the streaming behavior needed for SPDY (both compression and decompression). Also wik: copy()/uncopy() are aware of the 'dict'

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing added the comment: Argh, probably need to add the 'dict' field to the copy() method. -- ___ Python tracker <http://bugs.python.o

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing added the comment: This test is rather large, since it includes the predefined SPDY draft 2 dictionary, and some real-world data. Not sure what the policy is on including so much data in a test. If there's enough time I could make a smaller test that also verifies the co

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing added the comment: Ok, here's the patch. It has a single short test. For use with SPDY, it's necessary to test that the following stream data also correctly decompresses, I'll attach that to the next comment. -- Added file: http://bugs.pytho

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing added the comment: I'm currently reworking this so that the dictionaries are provided in the constructor, and inflateSetDictionary() is called automatically. I've gone over the zlib RFC's and zlibmodule.c, and I'm fairly certain that whatever usage mode mi

[issue14684] zlib set dictionary support inflateSetDictionary

2012-04-27 Thread Sam Rushing
New submission from Sam Rushing : Google's SPDY protocol requires the use of a pre-defined compression dictionary. The current zlib module doesn't expose the two functions for setting the dictionary. This patch is minimal in the sense that it only exposes the two func