function nextTableBitSize(count, len, rootBits) {
    let /** @type{number} */ left = 1 << (len - rootBits);
    while (len < 15) {
      left -= count[len];
      if (left <= 0) {
        break;
      }
      len++;
      left <<= 1;
    }
    return len - rootBits;
  }
@param {!Int32Array} count
@param {number} len
@param {number} rootBits
@return {number}