Lines Matching refs:max_bits
164 int max_bits;
1502 if (src->max_bits == 0) {
1507 const size_t size = (size_t)1 << src->max_bits;
1508 dst->max_bits = src->max_bits;
1801 *state = ((*state << bits) + rest) & (((u16)1 << dtable->max_bits) - 1);
1809 // Read in a full `dtable->max_bits` bits to initialize the state
1810 const u8 bits = dtable->max_bits;
1841 while (bit_offset > -dtable->max_bits) {
1852 // any data from the stream, so it should have "read" dtable->max_bits from
1855 // dtable->max_bits before the start of the stream
1856 if (bit_offset != -dtable->max_bits) {
1903 u8 max_bits = 0;
1913 max_bits = MAX(max_bits, bits[i]);
1917 const size_t table_size = 1 << max_bits;
1918 table->max_bits = max_bits;
1934 rank_idx[max_bits] = 0;
1935 for (int i = max_bits; i >= 1; i--) {
1936 rank_idx[i - 1] = rank_idx[i] + rank_count[i] * (1 << (max_bits - i));
1950 // Since the code doesn't care about the bottom `max_bits - bits[i]`
1953 const u16 len = 1 << (max_bits - bits[i]);
1980 const int max_bits = highest_set_bit(weight_sum) + 1;
1981 const u64 left_over = ((u64)1 << max_bits) - weight_sum;
1993 bits[i] = weights[i] > 0 ? (max_bits + 1 - weights[i]) : 0;
1996 max_bits + 1 - last_weight; // Last weight is always non-zero