I have a requirement that while doing raw deflate, zlib is provided with a prehistory buffer of 4KB to seed dictionary. The input Data CHUNK Size is also 4KB and prehistory needs to be used for each one of them, and every 4KB data from file is independently compressed. I have doubts about window size and where is Dictionary loaded in Window (at position 0) Following are some questions.
- Should my Window size here be 8KB [4KB for Prehistory + 4KB for history produced with Raw Data]
- Is it correct that while using
deflateSetDictionary, the first 4KB of window will be loaded with Dictionary(pre-history) buffer and next 4KB in window will be filled as raw data is compressed