Been learning about arithmetic coding and made thi...
# show-and-tell
b
Been learning about arithmetic coding and made this notebook to make it easier for people to understand. It does have JavaScript's rounding issues, but the example is only 5 bytes so it doesn't break on that small data sample. Looking at using big.js to see if that will fix the problem or use scaling so all the math can be done with integers. https://observablehq.com/@hellonearthis/arithmetic-coding
🙌 2
👏 1
Updated to use Big.js it can encode more bytes but is still limited and not really useful. 400 bytes needs a number with 1000 decimal places. I am going to have to look at other versions of this encoding to see if I am missing something simple. Still it was a fun experiment. https://observablehq.com/@hellonearthis/arithmetic-coding-with-big-js