Deflate Algorithm - Deflector Stream Format - Documentation Beyond RFC1951
I've been working on a streaming deflate implementation and found this description helpful:
http://www.zlib.net/feldspar.html
I tried the zlib source first, but it's not easy to read.
source to share
Could you just use zlib instead of rolling around on your own?
To support precompressed preambles, you can:
Use the original API (the ones that use z_streamp
as a parameter), not higher level wrappers.
Initialize the compressed preamble with your own z_streamp
and buffer the output.
Then, for all subsequent uses of the preamble, copy the output preamble buffer to the output and copy the preamble z_streamp
and use that copy to compress subsequent bytes.
source to share