Lines Matching refs:Len
152 * Reverse the first len bits of a code, using straightforward code (a faster
154 * IN assertion: 1 <= len <= 15
156 local unsigned bi_reverse(unsigned code, int len) {
161 } while (--len > 0);
200 * the given tree and the field len is set for all tree elements.
225 int len = tree[n].Len;
226 if (len == 0) continue;
228 tree[n].Code = (ush)bi_reverse(next_code[len]++, len);
231 n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len] - 1));
240 # define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
246 send_bits(s, tree[c].Code, tree[c].Len); }
276 { int len = length;\
277 if (s->bi_valid > (int)Buf_size - len) {\
282 s->bi_valid += len - Buf_size;\
285 s->bi_valid += len;\
354 while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
355 while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
356 while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
357 while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
366 static_dtree[n].Len = 5;
400 static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5));
406 static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
535 * OUT assertions: the field len is set to the optimal bit length, the
559 tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
563 bits = tree[tree[n].Dad].Len + 1;
565 tree[n].Len = (ush)bits;
575 if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits);
605 if ((unsigned) tree[m].Len != (unsigned) bits) {
606 Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
607 s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
608 tree[m].Len = (ush)bits;
623 * OUT assertions: the fields len and code are set to the optimal bit length
646 tree[n].Len = 0;
659 s->opt_len--; if (stree) s->static_len -= stree[node].Len;
704 /* The field len is now set, we can generate the bit codes */
716 int nextlen = tree[0].Len; /* length of next code */
722 tree[max_code + 1].Len = (ush)0xffff; /* guard */
725 curlen = nextlen; nextlen = tree[n + 1].Len;
757 int nextlen = tree[0].Len; /* length of next code */
762 /* tree[max_code + 1].Len = -1; */ /* guard already set */
766 curlen = nextlen; nextlen = tree[n + 1].Len;
818 if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
846 send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);