MCPcopy Create free account
hub / github.com/RsyncProject/rsync / bi_flush

Function bi_flush

zlib/trees.c:1104–1115  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1102 * Flush the bit buffer, keeping at most 7 bits in it.
1103 */
1104local void bi_flush(deflate_state *s)
1105{
1106 if (s->bi_valid == 16) {
1107 put_short(s, s->bi_buf);
1108 s->bi_buf = 0;
1109 s->bi_valid = 0;
1110 } else if (s->bi_valid >= 8) {
1111 put_byte(s, (Byte)s->bi_buf);
1112 s->bi_buf >>= 8;
1113 s->bi_valid -= 8;
1114 }
1115}
1116
1117/* ===========================================================================
1118 * 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