MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / bi_flush

Function bi_flush

extlibs/minizip/src/trees.c:1262–1278  ·  view source on GitHub ↗

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

(s)

Source from the content-addressed store, hash-verified

1260 * Flush the bit buffer, keeping at most 7 bits in it.
1261 */
1262local void bi_flush(s)
1263
1264deflate_state* s;
1265{
1266 if (s->bi_valid == 16)
1267 {
1268 put_short(s, s->bi_buf);
1269 s->bi_buf = 0;
1270 s->bi_valid = 0;
1271 }
1272 else if (s->bi_valid >= 8)
1273 {
1274 put_byte(s, (Byte)s->bi_buf);
1275 s->bi_buf >>= 8;
1276 s->bi_valid -= 8;
1277 }
1278}
1279
1280/* ===========================================================================
1281 * 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