Lines Matching refs:heap
7106 this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */
7107 zero(this.heap);
10414 tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */
10417 n = s.heap[h];
10465 m = s.heap[--h];
10702 var v = s.heap[k];
10707 smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {
10711 if (smaller(tree, v, s.heap[j], s.depth)) { break; }
10714 s.heap[k] = s.heap[j];
10720 s.heap[k] = v;
10811 s.heap[++s.heap_len] = max_code = n;
10825 node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);
10849 n = s.heap[1/*SMALLEST*/];
10850 s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];
10854 m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */
10856 s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */
10857 s.heap[--s.heap_max] = m;
10865 s.heap[1/*SMALLEST*/] = node++;
10870 s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];