code: function zip_pqdownheap(
      tree, // the tree to restore
      k) { // node to move down
      var v = zip_heap[k];
      var j = k << 1; // left son of k
  
      while (j <= zip_heap_len) {
          // Set j to the smallest of the two sons:
          if (j < zip_heap_len &&
              zip_SMALLER(tree, zip_heap[j + 1], zip_heap[j]))
              j++;
  
          // Exit if v is smaller than both sons
          if (zip_SMALLER(tree, v, zip_heap[j]))
              break;
  
          // Exchange v with the smallest son
          zip_heap[k] = zip_heap[j];
          k = j;
  
          // And continue down the tree, setting j to the left son of k
          j <<= 1;
      }
      zip_heap[k] = v;
  }
docs: /* ==========================================================================
  Restore the heap property by moving down the tree starting at node k,
  exchanging a node with the smallest of its two sons if necessary, stopping
  when the heap property is re-established (each father smaller than its
  two sons).