MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / bi_windup

Function bi_windup

extern/zlib/src/trees.c:181–192  ·  view source on GitHub ↗

=========================================================================== * Flush the bit buffer and align the output on a byte boundary */

Source from the content-addressed store, hash-verified

179 * Flush the bit buffer and align the output on a byte boundary
180 */
181local void bi_windup(deflate_state *s) {
182 if (s->bi_valid > 8) {
183 put_short(s, s->bi_buf);
184 } else if (s->bi_valid > 0) {
185 put_byte(s, (Byte)s->bi_buf);
186 }
187 s->bi_buf = 0;
188 s->bi_valid = 0;
189#ifdef ZLIB_DEBUG
190 s->bits_sent = (s->bits_sent + 7) & ~7;
191#endif
192}
193
194/* ===========================================================================
195 * Generate the codes for a given tree and bit counts (which need not be

Callers 2

_tr_stored_blockFunction · 0.85
trees.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected