I'm interested on documentation of the deflate stream format or deflate algorithm which goes beyond RFC1951. Sample streams, implementation hints whatever may be interesting.
Asked
Active
Viewed 1,190 times
2 Answers
2
I worked on a streaming implementation of deflate once and found this description helpful:
http://www.zlib.net/feldspar.html
At first I tried the zlib source, but it is not an easy read.

David Crawshaw
- 10,427
- 6
- 37
- 39
0
You could just use zlib rather than rolling your own?
To support pre-compressed preambles, you could:
Use the raw API (those using z_streamp
as a parameter) rather than the higher level wrappers.
Initialise the compressed preamble with it's own z_streamp
and place the output in a buffer.
Then for all subsequent uses of the preamble, copy the preamble output buffer to the output, and copy the preamble's z_streamp
and use that copy for compressing the subsequent bytes.

Will
- 73,905
- 40
- 169
- 246
-
No, i couldn't because i need some functions that zlib don't provide. – Thomas Maierhofer Sep 13 '09 at 12:12
-
What functions? If you're specific, we might be able to help. – Will Sep 13 '09 at 14:15
-
I need the possibility to insert pre compressed data in a deflate stream. I think it is hard to do. I've described the problem already in this question: http://stackoverflow.com/questions/1410533/deflate-compression-stream-where-pre-compressed-data-can-be-inserted-does-a-net – Thomas Maierhofer Sep 13 '09 at 21:40