=========================================================================== * Flush the bit buffer and align the output on a byte boundary */
| 179 | * Flush the bit buffer and align the output on a byte boundary |
| 180 | */ |
| 181 | local 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 |
no outgoing calls
no test coverage detected