docs: private void copyToOffset(int offset) {
      final int minCapacity = 2 * (offset + nbrruns);
      if (valueslength.length < minCapacity) {
        // expensive case where we need to reallocate
        int newCapacity = valueslength.length;
        while (newCapacity < minCapacity) {
          newCapacity = (newCapacity == 0) ? DEFAULT_INIT_SIZE
              : newCapacity < 64 ? newCapacity * 2
                  : newCapacity < 1024 ? newCapacity * 3 / 2 : newCapacity * 5 / 4;
        }
        short[] newvalueslength = new short[newCapacity];
        copyValuesLength(this.valueslength, 0, newvalueslength, offset, nbrruns);
        this.valueslength = newvalueslength;
      } else {
        // efficient case where we just copy
        copyValuesLength(this.valueslength, 0, this.valueslength, offset, nbrruns);
      }
    }