Passer en français

Lossless Image Compression

Introduction

This research effort started with the release of the excellent QOI format. Its simplicity and execution speed piqued my curiosity and led me to explore two questions:

Key Reference Formats

Reference Benchmark

Let’s take a classic image from the literature (from the Kodak corpus), kodim23:

kodim23

Let’s compare the resulting file size and compression time using each codec’s default settings:

Format File size (bytes) Compression time (s)
PPM (uncompressed) 1 179 663 0
QOI 675 251 0.023
PNG 557 596 0.276
WebP (lossless) 426 464 0.324
FLIF 385 544 1.866
JPEG XL (lossless) 382 055 1.046
PAQ (paq8px) 244 703 200.000

These measurements illustrate the fundamental trade-off every compressor must make, depending on whether it aims to minimize:

Explorations and Algorithmic Directions

While the initial goal was to improve on QOI, the temptation to measure up against the best compressors in the field quickly becomes hard to resist—and there is always something denser (at least until PAQ).

Over several years of experimentation, I’ve dug into the core building blocks of lossless compression:

This work focuses primarily on natural images (photographs, medical or satellite imagery). Synthetic images (icons, pictograms, screenshots) follow a very different physics—limited palettes, flat fills, repeated patterns—and call for distinct strategies.

Target Goal

The challenge I set for myself is to design an algorithm (and variants geared toward speed/parallelism or density) capable of:

The mechanisms explored and the results achieved will be detailed progressively in posts on this blog.