Lines Matching defs:max
15 Fix bug for initial root table size == max - 1
133 len: 1..max - 1 (max == maximum code length in bits)
140 len is less than max, since the code completes immediately when len == max.
144 the array with length max-1 lists for the len index, with syms-3 of those
225 int max; // maximum allowed bit length for the codes
239 (left >> 1) - 1) * (g.max - 1) +
258 // through max inclusive, coding syms symbols, with left bit patterns of length
267 assert(syms > left && left > 0 && len < g.max);
284 int most = (((code_t)left << (g.max - len)) - syms) /
285 (((code_t)1 << (g.max - len)) - 1);
386 left = 1 << g.max;
387 for (int bits = g.max; bits > g.root; bits--) {
397 for (int bits = g.root + 1; bits <= g.max; bits++)
421 int most = (((code_t)left << (g.max - len)) - syms) /
422 (((code_t)1 << (g.max - len)) - 1);
456 for (int n = 0; n <= g.max; n++)
462 if (g.root < g.max) // otherwise, there's only a base table
468 if (g.root + 1 < g.max && g.num[index]) // reachable node
508 g.max = 15;
514 g.max = atoi(argv[3]);
517 if (argc > 4 || syms < 2 || g.root < 1 || g.max < 1) {
518 fputs("invalid arguments, need: [sym >= 2 [root >= 1 [max >= 1]]]\n",
524 if (g.max > syms - 1)
525 g.max = syms - 1;
533 if (g.max > bits || (code_t)(syms - 2) >= ((code_t)-1 >> (g.max - 1))) {
539 if ((code_t)(syms - 1) > ((code_t)1 << g.max) - 1) {
541 syms, g.max);
546 g.code = calloc(g.max + 1, sizeof(int));
551 if (syms == 2) // iff max == 1
558 n = g.max - 1;
573 if (g.max < syms - 1)
574 printf(" (%d-bit length limit)\n", g.max);
587 if (g.root > g.max) // reduce root to max length
588 g.root = g.max;