Lightweight CODECs

I’m a big fan of simplicity in software. Less code typically means easier to understand, easier to debug, easier to eliminate security issues, and sometimes faster to run.

Dominic Szablewski’s “Quite OK Image Format” aims for lossless compression that’s similar to PNG (in size) with much faster decoding and a basic decoder being only 300 lines of C.

github | one-page spec

Dominic is now working on the “Quite OK Audio Format” which is a tiny and simple lossy audio codec that aims for roughly 2x the file size of an mp3, with similar audio quality, but much faster decode speeds and a reference decoder that’s around 400 lines of C.

github | spec still in development

The link above to the blog post has a LOT more information and is a good read.

The only decision that doesn’t really make sense to me is to use big-endian 64bit words for the data type, given that just about every modern processor is little-endian. If I used QOA I’d probably flip that around to avoid some pointless byte swizzling.