I have been curious about data compression and the Zip file format in particular for a long time. At some point I decided to address that by learning how it works and writing my own Zip program. The implementation turned into an exciting programming exercise; there is great pleasure to be had from creating a well oiled machine that takes data apart, jumbles its bits into a more efficient representation, and puts it all back together again. Hopefully it is interesting to read about too.
This article explains how the Zip file format and its compression scheme work in great detail: LZ77 compression, Huffman coding, Deflate and all. It tells some of the history, and provides a reasonably efficient example implementation written from scratch in C.
One for the ages. Articles like this don’t get written every day.
I’m a bit shocked the author would actually re-implement old software like pkzip, but it is an interesting article that brings back memories. There were so many different archiving formats and tools in the BBS days.
I’ve kept backups of these programs. I probably don’t have any archives files to use these on any longer, but I distinctly remember using many of these in the day.
You’d go download some archive over kermit, ymodem, and zmodem and need these extraction programs. Things have really consolidated since then with a few winners taking over most of the market.