MCPcopy Create free account
hub / github.com/MariaDB/server / send_bits

Function send_bits

zlib/trees.c:253–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251 */
252#ifdef ZLIB_DEBUG
253local void send_bits(deflate_state *s, int value, int length) {
254 Tracevv((stderr," l %2d v %4x ", length, value));
255 Assert(length > 0 && length <= 15, "invalid length");
256 s->bits_sent += (ulg)length;
257
258 /* If not enough room in bi_buf, use (valid) bits from bi_buf and
259 * (16 - bi_valid) bits from value, leaving (width - (16 - bi_valid))
260 * unused bits in value.
261 */
262 if (s->bi_valid > (int)Buf_size - length) {
263 s->bi_buf |= (ush)value << s->bi_valid;
264 put_short(s, s->bi_buf);
265 s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
266 s->bi_valid += length - Buf_size;
267 } else {
268 s->bi_buf |= (ush)value << s->bi_valid;
269 s->bi_valid += length;
270 }
271}
272#else /* !ZLIB_DEBUG */
273
274#define send_bits(s, value, length) \

Callers 6

send_treeFunction · 0.85
send_all_treesFunction · 0.85
_tr_stored_blockFunction · 0.85
_tr_alignFunction · 0.85
compress_blockFunction · 0.85
trees.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected