from Arithemetic Coding by Ravi Lakkundi
Program to compress text using arithmetic coding.

done_encoding
function done_encoding

format long
global bits_to_follow low first_qtr

bits_to_follow=bits_to_follow+1;
if(low<first_qtr),bit_plus_follow(0);
else bit_plus_follow(1);
end

Contact us at files@mathworks.com