Arithmetic coder nearly working, trouble with one of the test files. Probably due to small counters or overflow. Need to implement soulution to these