logoalt Hacker News

doodlesdevtoday at 5:59 AM3 repliesview on HN

I knew about the lossless JPEG to JPEG XL compression story before, but had no idea that it was a two-way road. That's truly f* impressive. Boggles my mind even more the fact this format hasn't been adopted widely yet.


Replies

magicalhippotoday at 6:16 AM

JPEG is a lossy frequency-space compression stage followed by a lossless Huffman coding stage. The second stage is quite generic as such, essentially compressing a stream of bits.

So you can relatively easily replace the second stage with something better. And since it's lossless you can easily go back.

Dropbox[1] and others have exploited this for reducing storage requirements, converting back on-demand so the client doesn't notice.

https://github.com/dropbox/lepton

jaffathecaketoday at 8:05 AM

Because what you save in terms of storage, you pay for in decode time, which is an important consideration on the web.

jbverschoortoday at 7:29 AM

byte-for-byte identical file actually. Not just imagery. You can basically save 30% without loosing ANY bit of the original file