// Recover the text
nb.val=0;
byte[]d=new byte[N+1];
for (i=0;i<N+1;i++) {
d[i]=(byte)huff.decodeone(code,nb);
localflag = localflag || (c[i] != d[i]);
}
globalflag = globalflag || localflag;
if (localflag) {
fail("*** Huffcode: Recovered message not the same as the original");