3 ms·
I found the article after trying to pick up my DEFLATE project again. I quit 6 months ago after trying endlessly to understand package-merge, so I'm glad this w
by Rendello 5y ago
I found the article after trying to pick up my DEFLATE project again. I quit 6 months ago after trying endlessly to understand package-merge, so I'm glad this was written in the meantime.
I posted some (slightly mistaken) comments at the time: https://news.ycombinator.com/item?id=26220442 https://news.ycombinator.com/item?id=26220442
- dunham 5y agoI went through something similar a year or so ago. I wrote deflate for a little javascript PDF writer. For my first pass, I used the static tables. A little research pointed me at package merge (I think Go used it, and zlib itself was inscrutable). After a couple of evenings, I gave up on it as not worth the effort, since my primary goal was writing PDFs, not implementing zlib. From the article, it sounds like zlib might not even be using package-merge.
- Rendello 5y agoRelatedly, I was looking at Zlib's source today and realized they still use old, 70s-style function declarations: int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) Bytef *dest; uLongf *destLen; const Bytef *source; uLong sourceLen; int level; { z_stream stream; int err; const uInt max = (uInt)-1; … https://github.com/madler/zlib/blob/master/compress.c https://github.com/madler/zlib/blob/master/compress.c