Lines Matching defs:bit

27    the bit values to the codes (i.e. only canonical codes are counted).
31 be coded, what the last code length used was, and how many bit patterns of
36 properties are: we cannot use more bit patterns than are available; and when
37 all the symbols are used, there are exactly zero possible bit patterns
48 that root-bit prefix. If that longest code has length len, then the table
50 codes. Each subsequent root-bit prefix then has its own sub-table. The
52 incrementally as the number of codes at each bit length is populated. When
71 Second, the intermediate states that lead to (root + 1) bit or longer codes
77 Beginning the code examination at (root + 1) bit codes, which is enabled by
83 for the default arguments of 286 symbols limited to 15-bit codes.
96 where the bit pattern counting takes place.
108 typedef unsigned long long code_t; /* type for bit pattern counting */
110 size_t len; /* length of bit vector in char's */
111 char *vec; /* allocated bit vector */
117 left: number of available bit patterns at length len
127 must be even, since it represents the number of available bit patterns at
141 For the deflate example of 286 symbols limited to 15-bit codes, the array
152 element is simply one bit indicating whether the state has been visited or
153 not. Since the ranges for mem and rem are not known a priori, each bit
159 calculations for offset and bit in beenhere() for the details.
161 For the deflate example of 286 symbols limited to 15-bit codes, the bit
167 local int max; /* maximum allowed bit length for the codes */
171 local int *code; /* number of symbols assigned to each bit length */
195 /* Return the number of possible Huffman codes using bit patterns of lengths
196 len through max inclusive, coding syms symbols, with left bit patterns of
206 int use; /* number of bit patterns to use in next call */
222 /* we need to use at least this many bit patterns so that the code won't be
223 incomplete at the next length (more bit patterns than symbols) */
228 /* we can use at most this many bit patterns, lest there not be enough
251 /* Return true if we've been here before, set to true if not. Set a bit in a
252 bit vector to indicate visiting this state. Each (syms,len,left) state
253 has a variable size bit vector indexed by (mem,rem). The bit vector is
254 lengthened if needed to allow setting the (mem,rem) bit. */
257 size_t index; /* index for this state's bit vector */
258 size_t offset; /* offset in this state's bit vector */
259 int bit; /* mask for this state's bit */
260 size_t length; /* length of the bit vector in bytes */
261 char *vector; /* new or enlarged bit vector */
263 /* point to vector for (syms,left,len), bit in vector for (mem,rem) */
268 bit = 1 << (mem & 7);
272 if (offset < length && (done[index].vec[offset] & bit) != 0)
275 /* we haven't been here before -- set the bit to show we have now */
277 /* see if we need to lengthen the vector in order to set the bit */
309 /* set the bit */
310 done[index].vec[offset] |= bit;
323 int use; /* number of bit patterns to use in next call */
358 /* we need to use at least this many bit patterns so that the code won't be
359 incomplete at the next length (more bit patterns than symbols) */
364 /* we can use at most this many bit patterns, lest there not be enough
403 int left; /* number of unused bit patterns at this length */
410 /* look at all (root + 1) bit and longer codes */
416 /* look at all reachable (root + 1) bit nodes, and the
422 /* also look at root bit codes with completions at root + 1
544 printf(" (%d-bit length limit)\n", max);