1 hour ago · 13 min read2650 words · Tech · hide

I have a secret fascination with image compression formats. I think it started a year or two ago when someone at work uploaded a PNG image that looked rather large to me, and I asked them to compress the file first. At that point I knew about the standard compression tools like pngcrush and optiPNG, but didn’t know exactly how they worked. I then also became acquainted with Zopflipng which absolutely knocked it out of the park with that file and blew my mind. How do they all work, and how come this new algorithm from the fine people at Google can be so much better than the old ones? How is it even possible for the same image to have so many different representations within the exact same file format? Structure of the PNG format To understand the PNG format one needs to understand the structure of the binary file. The file consists of typed chunks. There are chunks for different kinds of metadata and color profiles, for example, and indeed the first thing that many optimizers do is to…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town