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.
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 compresseddeflateSetDictionary()
, using the length argument. zlib deals with where it actually goes in the buffer.