Lines Matching defs:need
58 * Return need bits from the input stream. This always leaves less than
59 * eight bits in the buffer. bits() works properly for need == 0.
68 local int bits(struct state *s, int need)
72 /* load at least need bits into val */
74 while (s->bitcnt < need) {
84 /* drop need bits and update buffer, always zero to seven bits left */
85 s->bitbuf = val >> need;
86 s->bitcnt -= need;
88 /* return need bits, zeroing the bits above that */
89 return val & ((1 << need) - 1);