Deflate Algorithm - Deflector Stream Format - Documentation Beyond RFC1951
I am interested in documentation on deflation stream format or descent algorithm that is outside the scope of RFC1951. Examples of streams, implementation hints that might be interesting.
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.
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.