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