Lines Matching refs:size
1 /* enough.c -- determine the maximum size of inflate's Huffman code tables over
14 1.3 17 Feb 2008 Add argument for initial root table size
15 Fix bug for initial root table size == max - 1
26 maximum code length in bits to determine the maximum table size for zlib's
53 The size of that table is determined by the longest code with that root-bit
54 prefix. If that longest code has length len, then the table has size 1 <<
82 size is recalled in order to avoid recalculating from the same juncture.
147 index, and the calculation of size in main() for the size of the array.
162 vector is of a variable size, and grows as needed to accommodate the visited
176 size_t size; // size of allocation
188 s->size = 16;
189 s->str = malloc(s->size);
198 s->size = 0;
208 int ret = vsnprintf(s->str + len, s->size - len, fmt, ap);
211 if (s->size < s->len + 1) {
213 s->size <<= 1;
214 assert(s->size != 0 && "overflow");
215 } while (s->size < s->len + 1);
216 s->str = realloc(s->str, s->size);
218 vsnprintf(s->str + len, s->size - len, fmt, ap);
226 int root; // size of base code table in bits
228 size_t size; // number of elements in num and done
229 big_t tot; // total number of codes with maximum tables size
230 string_t out; // display of subcodes for maximum tables size
246 for (size_t n = 0; n < g.size; n++)
249 g.size = 0;
306 // variable size bit vector indexed by (mem,rem). The bit vector is lengthened
484 // maximum number of symbols, initial root table size, and maximum code length
549 // determine size of saved results array, checking for overflows,
554 g.size = syms >> 1;
556 assert(g.size <= (size_t)-1 / n && "overflow");
557 g.size *= n;
559 assert(g.size <= (size_t)-1 / n && "overflow");
560 g.size *= n;
561 g.num = calloc(g.size, sizeof(big_t));
582 g.done = calloc(g.size, sizeof(struct tab));