// for (i=0;i<NCHAR;i++) System.out.printf(nfreq[i] << " ";
// System.out.printf(endl;
// 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);