docs: protected void ensureCapacity(int minNbRuns) {
      final int minCapacity = 2 * minNbRuns;
      if (valueslength.capacity() < minCapacity) {
        int newCapacity = valueslength.capacity();
        while (newCapacity < minCapacity) {
          newCapacity = (newCapacity == 0) ? DEFAULT_INIT_SIZE
              : newCapacity < 64 ? newCapacity * 2
                  : newCapacity < 1024 ? newCapacity * 3 / 2 : newCapacity * 5 / 4;
        }
        final ShortBuffer nv = ShortBuffer.allocate(newCapacity);
        valueslength.rewind();
        nv.put(valueslength);
        valueslength = nv;
      }
    }