arithmetic-coding
This code is very heavily based on the binary implementation of arithmetic coding from this (excellent) article that originally appeared in Dr. Dobbs Journal by Mark Nelson: https://marknelson.us/posts/2014/10/19/data-compression-with-arithmetic-coding.html