how to use zlib.compressobj(..., zdict)
compression, gzip, python-3.x, zlib
Solution
No, there is no delimiter needed. All the dictionary is is a resource in which to look for strings that match portions of the data to be compressed. Therefore strings that are likely to occur can simply be concatenated. Or even overlapped if starts and ends match. For example if you want the words lighthouse and household to be available, you can just put lighthousehold in the dictionary.
Since it takes more bits to represent matches that are further back, you would put the most likely matches at the end of the dictionary.
Problem
i'm trying to preset zlib's dictionary for compression. as of python 3.3 `zlib.compressobj` function offers the option. the docs say it should be some `bytesarray` or a `bytes` object e.g. `b"often-found"`. now: how to pass multiple strings ordered ascending by their likeliness to occur as suggested in the docs? is there a secret delimiter e.g. `b"likely,more-likely,most-likely"`?