MCPcopy Index your code
hub / github.com/RsyncProject/rsync / deflatePrime

Function deflatePrime

zlib/deflate.c:483–503  ·  view source on GitHub ↗

========================================================================= */

Source from the content-addressed store, hash-verified

481
482/* ========================================================================= */
483int ZEXPORT deflatePrime (z_streamp strm, int bits, int value)
484{
485 deflate_state *s;
486 int put;
487
488 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
489 s = strm->state;
490 if (s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
491 return Z_BUF_ERROR;
492 do {
493 put = Buf_size - s->bi_valid;
494 if (put > bits)
495 put = bits;
496 s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid);
497 s->bi_valid += put;
498 _tr_flush_bits(s);
499 value >>= put;
500 bits -= put;
501 } while (bits);
502 return Z_OK;
503}
504
505/* ========================================================================= */
506int ZEXPORT deflateParams(z_streamp strm, int level, int strategy)

Callers

nothing calls this directly

Calls 1

_tr_flush_bitsFunction · 0.85

Tested by

no test coverage detected