Lines Matching refs:pp
42 struct pushpull pp; member
47 static inline void init_pushpull(struct pushpull *pp, char *buf, in init_pushpull() argument
51 pp->buf = buf; in init_pushpull()
52 pp->buflen = buflen; in init_pushpull()
53 pp->ofs = ofs; in init_pushpull()
54 pp->reserve = reserve; in init_pushpull()
57 static inline int pushbit(struct pushpull *pp, int bit, int use_reserved) in pushbit() argument
59 if (pp->ofs >= pp->buflen - (use_reserved?0:pp->reserve)) in pushbit()
63 pp->buf[pp->ofs >> 3] |= (1<<(7-(pp->ofs & 7))); in pushbit()
65 pp->buf[pp->ofs >> 3] &= ~(1<<(7-(pp->ofs & 7))); in pushbit()
67 pp->ofs++; in pushbit()
72 static inline int pushedbits(struct pushpull *pp) in pushedbits() argument
74 return pp->ofs; in pushedbits()
77 static inline int pullbit(struct pushpull *pp) in pullbit() argument
81 bit = (pp->buf[pp->ofs >> 3] >> (7-(pp->ofs & 7))) & 1; in pullbit()
83 pp->ofs++; in pullbit()
112 ret = pushbit(&rs->pp, (rs->q & UPPER_BIT_RUBIN) ? 1 : 0, 0); in encode()
144 pushbit(&rs->pp, (UPPER_BIT_RUBIN & rs->q) ? 1 : 0, 1); in end_rubin()
159 rs->rec_q = rs->rec_q * 2 + (long) (pullbit(&rs->pp))) in init_decode()
192 c = pullbit(&rs->pp); in __do_decode()
270 init_pushpull(&rs.pp, cpage_out, *dstlen * 8, 0, 32); in rubin_do_compress()
287 outpos = (pushedbits(&rs.pp)+7)/8; in rubin_do_compress()
376 init_pushpull(&rs.pp, cdata_in, srclen, 0, 0); in rubin_do_decompress()