I went through SO question in this field, but couldn't find what I was looking for.
I'm sending small binary files (~5MB) over narrow-band network, which should be pretty much similar and I want to compress them using zlib (python).
I would like to build a pre-defined dictionary, but standard common dictionaries are not relevant since it's a non-textual information.
Moreover, finding the common sequences manually is also not an easy job and would work only on this specific type of file.
I'm looking for a test-n-inspect method where I could just compress a file, and see the dictionary used for that output (the compressed data).
Then, by collecting those dictionaries I can run some tests to find the optimal.
Question is (after searching in zlib specification): how can I extract the dictionary from the compressed binary data?
I see that each compressed data starts with binary data then 2 \x00 bytes, then the data.
So I believe it's there, but how can I extract and use it? (or I'm not even close...)
(testing zlib with python 2.7)