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