// Test codeone
Arithcode arith = new Arithcode (nfreq,NCHAR,256);
arith.messageinit();
lcd.val=0;
byte[] code = new byte[N];
for (i=0;i<N;i++) arith.codeone(c[i],code,lcd);
arith.codeone(NCHAR,code,lcd); // EOM character
// System.out.println("Number of bytes used: %f\n", lcd);
// System.out.println("Compression ratio: %f\n", double(N*3)/8/lcd); // Normally 3 bits each for 5 characters
// Recover the text