Compressing Text into Images


Random grey noise.

(This is, I think, a silly idea. But sometimes the silliest things lead to unexpected results.) The text of Shakespeare's Romeo and Juliet is about 146,000 characters long. Thanks to the English language, each character can be represented by a single byte. So a plain Unicode text file of the play is about 142KB. In […]

Continue reading →

What's the smallest file size for a 1 pixel image?


An icon representing a broken image.

There are lots of new image compression formats out there. They excel at taking large, complex pictures and algorithmically reducing them to smaller file sizes. All of the comparisons I've seen show how good they are at squashing down big files. I wanted to go the other way. How good are modern codecs at dealing […]

Continue reading →

Sometimes gzip beats Brotli


Screenshot showing a transfer with the content-encoding as gzip.

Perhaps this was obvious to you, but it wasn't to me. So I'm sharing in the hope that you don't spend an evening trying to trick your webserver into doing something stupid. For years, HTTP content has been served with gzip compression (gz). It's basically the same sort of compression algorithm you get in a […]

Continue reading →

Selectively Compressed Images - A Hybrid Format


Screenshot of a camera app on a phone. The middle is a photo, the sides show the user interface.

I have a screenshot of my phone's screen. It shows an app's user interface and a photo in the middle. Something like this: If I set the compression to be lossy - the photo looks good but the UI looks bad. If I set the compression to be lossless - the UI looks good but […]

Continue reading →

Energy efficiency of modern codecs


Binary code displayed on a screen.

How efficient are modern codecs? Can we ever work out whether the power use of compression algorithms is a net gain for global power consumption? Come on a thought experiment with me. I have invented a new image compression format. It shrinks images to 50% smaller sizes than AVIF and is completely lossless. Brilliant! There's […]

Continue reading →