It is a simple arithmetic coder that I used it to teach students. The coders plot how the region is expanded and shrank and when bits will be streamed in and out. Disclaimer: this is not a productive code that you want to use it to do some real heavy duty work.
Samuel Cheng (2020). Yet another arithmetic coding example (https://www.mathworks.com/matlabcentral/fileexchange/30464-yet-another-arithmetic-coding-example), MATLAB Central File Exchange. Retrieved .