public int DecodeBit(int context)
{
return (DecodeBool(context) ? 1 : 0);
}
private void TestArithmetic(Arithmetic a) { byte[] d = new byte[a.BytesLeft()]; for(int i = 0; i < d.Length; i++) { byte c = 0; for(int j = 0; j < 8; j++) { c = (byte)((c << 1) | a.DecodeBit(j)); } d[i] = c; } String s = System.Text.Encoding.Default.GetString(d); Console.WriteLine(s); }