Lines Matching refs:pp
41 struct pushpull pp;
46 static inline void init_pushpull(struct pushpull *pp, char *buf, unsigned buflen, unsigned ofs, unsigned reserve)
48 pp->buf = buf;
49 pp->buflen = buflen;
50 pp->ofs = ofs;
51 pp->reserve = reserve;
54 static inline int pushbit(struct pushpull *pp, int bit, int use_reserved)
56 if (pp->ofs >= pp->buflen - (use_reserved?0:pp->reserve)) {
61 pp->buf[pp->ofs >> 3] |= (1<<(7-(pp->ofs &7)));
64 pp->buf[pp->ofs >> 3] &= ~(1<<(7-(pp->ofs &7)));
66 pp->ofs++;
71 static inline int pushedbits(struct pushpull *pp)
73 return pp->ofs;
76 static inline int pullbit(struct pushpull *pp)
80 bit = (pp->buf[pp->ofs >> 3] >> (7-(pp->ofs & 7))) & 1;
82 pp->ofs++;
86 static inline int pulledbits(struct pushpull *pp)
88 return pp->ofs;
114 ret = pushbit(&rs->pp, (rs->q & UPPER_BIT_RUBIN) ? 1 : 0, 0);
146 pushbit(&rs->pp, (UPPER_BIT_RUBIN & rs->q) ? 1 : 0, 1);
160 for (rs->bit_number = 0; rs->bit_number++ < RUBIN_REG_SIZE; rs->rec_q = rs->rec_q * 2 + (long) (pullbit(&rs->pp)))
192 c = pullbit(&rs->pp);
268 init_pushpull(&rs.pp, cpage_out, *dstlen * 8, 0, 32);
285 outpos = (pushedbits(&rs.pp)+7)/8;
364 init_pushpull(&rs.pp, cdata_in, srclen, 0, 0);