Has anyone implemented an arithmetic encoder in OCaml?

Hello,

I tried once but I kind of gave up at the stage where
I had to use some finite word size instead of arbitrary precision numbers.

I think a possible generic interface might be:
fun compress: string → int → string
where the integer defines on how many bytes floats are encoded.

2 Likes