Zip files: history, explanation, and implementation

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.

23 Comments

  1. 2020-03-07 12:09 am
    • 2020-03-07 11:49 am
    • 2020-03-07 4:07 pm
      • 2020-03-07 5:03 pm
        • 2020-03-09 6:39 am
          • 2020-03-10 4:01 pm
          • 2020-03-12 9:35 am
          • 2020-03-12 11:25 am
          • 2020-03-12 11:53 am
          • 2020-03-13 11:06 pm
          • 2020-03-14 12:31 am
      • 2020-03-08 4:07 am
        • 2020-03-11 3:54 pm
          • 2020-03-11 7:45 pm
      • 2020-03-08 10:26 am
    • 2020-03-08 4:38 am
      • 2020-03-08 4:00 pm
        • 2020-03-08 4:55 pm
          • 2020-03-09 12:24 pm
    • 2020-03-08 4:44 pm
      • 2020-03-09 12:26 pm
    • 2020-03-17 1:18 am
  2. 2020-03-09 8:31 pm