Hacker News new | ask | show | jobs
by eru 1562 days ago
That's basically how arithmetic coding works, isn't it?

https://en.wikipedia.org/wiki/Arithmetic_coding

1 comments

My impression is that arithmetic coding is the inverse. You have N symbols with different known probabilities, and you turn it into a stream of 1/2 probability random bits.

edit: On second thought this is probably a bijection and you can call it "arithmetic coding" in either direction.

Agreed.

As far as I can tell, arithmetic coding needs both a compressor and a decompressor. Otherwise it's relatively useless in eg your fancy video file format.