Skip to content

Commit

Permalink
Avoid empty function by renaming bi_flush to zng_tr_flush_bits.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dead2 committed Feb 12, 2024
1 parent 6f5bddd commit 3ac71d9
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions trees.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ static int build_bl_tree (deflate_state *s);
static void send_all_trees (deflate_state *s, int lcodes, int dcodes, int blcodes);
static void compress_block (deflate_state *s, const ct_data *ltree, const ct_data *dtree);
static int detect_data_type (deflate_state *s);
static void bi_flush (deflate_state *s);

/* ===========================================================================
* Initialize the tree data structures for a new zlib stream.
Expand Down Expand Up @@ -609,21 +608,14 @@ void Z_INTERNAL zng_tr_stored_block(deflate_state *s, char *buf, uint32_t stored
}
}

/* ===========================================================================
* Flush the bits in the bit buffer to pending output (leaves at most 7 bits)
*/
void Z_INTERNAL zng_tr_flush_bits(deflate_state *s) {
bi_flush(s);
}

/* ===========================================================================
* Send one empty static block to give enough lookahead for inflate.
* This takes 10 bits, of which 7 may remain in the bit buffer.
*/
void Z_INTERNAL zng_tr_align(deflate_state *s) {
zng_tr_emit_tree(s, STATIC_TREES, 0);
zng_tr_emit_end_block(s, static_ltree, 0);
bi_flush(s);
zng_tr_flush_bits(s);
}

/* ===========================================================================
Expand Down Expand Up @@ -790,7 +782,7 @@ static int detect_data_type(deflate_state *s) {
/* ===========================================================================
* Flush the bit buffer, keeping at most 7 bits in it.
*/
static void bi_flush(deflate_state *s) {
void Z_INTERNAL zng_tr_flush_bits(deflate_state *s) {
if (s->bi_valid >= 48) {
put_uint32(s, (uint32_t)s->bi_buf);
put_short(s, (uint16_t)(s->bi_buf >> 32));
Expand Down

0 comments on commit 3ac71d9

Please sign in to comment.