Wow, that new jpegli encoder. Just wow. Look at those results. Haha, JPEG has many years left still.
Such a shame arithmetic coding (which is already in the standard) isn't widely supported in the real world. Because converting Huffman coded images losslessly to arithmetic coding provides an easy 5-10% size advantage in my tests.
Alien technology from the future indeed.
JPEG XL, Brunsli, Draco 3D and ZStd use table-based arithmetic coding (ANS).
JPEG, Deflate, Brotli, MP3, WebP lossless and the fastest mode of JPEG XL lossless use prefix coding.