/* lz78.c -- Copyleft (C) 1990 by James A. Woods, RIACS, NASA Ames Research Center. essence of U.S. patent #4,464,650 by Lempel/Ziv/Cohn/Eastman, assignees Sperry Corporation and AT&T Bell Laboratories. invented 1976, published IEEE Trans. Info Theory, 1978, filed Aug. 10, 1981, awarded Aug. 7, 1984. */ #include #define BITS 14 short table[(1<>8) & 0377); /* tokens hardcoded at 16 bits here */ putchar(prefix & 0377); putchar(K); prefix = 0; if (i < (1< #define BITS 14 short table[(1<>8) & 0377); /* tokens hardcoded at 16 bits here */ putchar(prefix & 0377); prefix = K; if (i < (1< #define BITS 14 short table[(1<>8) & 0377); /* tokens hardcoded at 16 bits here */ putchar(prefix & 0377); if (i < (1< 1) { for (j = 1; j < count; j++) { newcode = (long) (((curmatch[j]) << BITS) + oldmatch); if (i < (1<