MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / bi_flush

Function bi_flush

zlib/trees.c:1161–1173  ·  view source on GitHub ↗

=========================================================================== * Flush the bit buffer, keeping at most 7 bits in it. */

(s)

Source from the content-addressed store, hash-verified

1159 * Flush the bit buffer, keeping at most 7 bits in it.
1160 */
1161local void bi_flush(s)
1162 deflate_state *s;
1163{
1164 if (s->bi_valid == 16) {
1165 put_short(s, s->bi_buf);
1166 s->bi_buf = 0;
1167 s->bi_valid = 0;
1168 } else if (s->bi_valid >= 8) {
1169 put_byte(s, (Byte)s->bi_buf);
1170 s->bi_buf >>= 8;
1171 s->bi_valid -= 8;
1172 }
1173}
1174
1175/* ===========================================================================
1176 * Flush the bit buffer and align the output on a byte boundary

Callers 1

_tr_alignFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected