MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bi_flush

Function bi_flush

freebsd/contrib/zlib/trees.c:1173–1185  ·  view source on GitHub ↗

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

(s)

Source from the content-addressed store, hash-verified

1171 * Flush the bit buffer, keeping at most 7 bits in it.
1172 */
1173local void bi_flush(s)
1174 deflate_state *s;
1175{
1176 if (s->bi_valid == 16) {
1177 put_short(s, s->bi_buf);
1178 s->bi_buf = 0;
1179 s->bi_valid = 0;
1180 } else if (s->bi_valid >= 8) {
1181 put_byte(s, (Byte)s->bi_buf);
1182 s->bi_buf >>= 8;
1183 s->bi_valid -= 8;
1184 }
1185}
1186
1187/* ===========================================================================
1188 * Flush the bit buffer and align the output on a byte boundary

Callers 2

_tr_flush_bitsFunction · 0.85
_tr_alignFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected