Lines Matching refs:bits
175 int bits; /* bit counter */ in tr_static_init() local
218 for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; in tr_static_init()
366 int bits; /* bit length */ in gen_bitlen() local
371 for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; in gen_bitlen()
380 bits = tree[tree[n].Dad].Len + 1; in gen_bitlen()
381 if (bits > max_length) bits = max_length, overflow++; in gen_bitlen()
382 tree[n].Len = (ush)bits; in gen_bitlen()
387 s->bl_count[bits]++; in gen_bitlen()
391 s->opt_len += (ulg)f * (bits + xbits); in gen_bitlen()
401 bits = max_length-1; in gen_bitlen()
402 while (s->bl_count[bits] == 0) bits--; in gen_bitlen()
403 s->bl_count[bits]--; /* move one leaf down the tree */ in gen_bitlen()
404 s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ in gen_bitlen()
417 for (bits = max_length; bits != 0; bits--) { in gen_bitlen()
418 n = s->bl_count[bits]; in gen_bitlen()
422 if (tree[m].Len != (unsigned) bits) { in gen_bitlen()
423 Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); in gen_bitlen()
424 s->opt_len += ((long)bits - (long)tree[m].Len) in gen_bitlen()
426 tree[m].Len = (ush)bits; in gen_bitlen()
449 int bits; /* bit index */ in gen_codes() local
455 for (bits = 1; bits <= MAX_BITS; bits++) { in gen_codes()
456 next_code[bits] = code = (code + bl_count[bits-1]) << 1; in gen_codes()