Lines Matching refs:s
262 #define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} argument
270 #define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) argument
276 void zlib_tr_init (deflate_state *s);
277 int zlib_tr_tally (deflate_state *s, unsigned dist, unsigned lc);
278 ulg zlib_tr_flush_block (deflate_state *s, char *buf, ulg stored_len,
280 void zlib_tr_align (deflate_state *s);
281 void zlib_tr_stored_block (deflate_state *s, char *buf, ulg stored_len,
290 #define put_short(s, w) { \ argument
291 put_byte(s, (uch)((w) & 0xff)); \
292 put_byte(s, (uch)((ush)(w) >> 8)); \
298 static inline void bi_flush(deflate_state *s) in bi_flush() argument
300 if (s->bi_valid == 16) { in bi_flush()
301 put_short(s, s->bi_buf); in bi_flush()
302 s->bi_buf = 0; in bi_flush()
303 s->bi_valid = 0; in bi_flush()
304 } else if (s->bi_valid >= 8) { in bi_flush()
305 put_byte(s, (Byte)s->bi_buf); in bi_flush()
306 s->bi_buf >>= 8; in bi_flush()
307 s->bi_valid -= 8; in bi_flush()
314 static inline void bi_windup(deflate_state *s) in bi_windup() argument
316 if (s->bi_valid > 8) { in bi_windup()
317 put_short(s, s->bi_buf); in bi_windup()
318 } else if (s->bi_valid > 0) { in bi_windup()
319 put_byte(s, (Byte)s->bi_buf); in bi_windup()
321 s->bi_buf = 0; in bi_windup()
322 s->bi_valid = 0; in bi_windup()
324 s->bits_sent = (s->bits_sent+7) & ~7; in bi_windup()