Home | History | Annotate | Download | only in src

Lines Matching refs:HASH

52 /* The following hash code is the heart of the algorithm:
53 * It builds a sliding hash sum of the previous 3-and-a-bit characters
55 * A better hash function would result in additional compression,
58 #define HASH(state, x) state->hash = (state->hash << 4) ^ (x)
62 u_short hash;
77 if (state->dict[state->hash] == *source) {
80 state->dict[state->hash] = *source;
83 HASH(state, *source++);
95 *dest++ = state->dict[state->hash] = *source;
96 HASH(state, *source++);
112 *dest = state->dict[state->hash]; /* Guess correct */
116 state->dict[state->hash] = *source; /* Guess wrong */
120 HASH(state, *dest++);
137 state->hash = 0;
146 state->hash = 0;