docs: private void srcMemoryToCombinedBuffer(final Memory srcMem, final int serVer,
                                           final boolean srcIsCompact, final int combBufCap) {
      final int preLongs = 2;
      final int extra = (serVer == 1) ? 3 : 2; // space for min and max values, buf alloc (SerVer 1)
      final int preBytes = (preLongs + extra) << 3;
  
      final int k = getK();
      combinedBuffer_ = new double[combBufCap];
  
      if (srcIsCompact) {
        // just load the array, sort base buffer if serVer 2
        srcMem.getDoubleArray(preBytes, combinedBuffer_, 0, combBufCap);
        if (serVer == 2) {
          Arrays.sort(combinedBuffer_, 0, baseBufferCount_);
        }
      } else {
        // non-compact source
        // load base buffer and ensure it's sorted
        srcMem.getDoubleArray(preBytes, combinedBuffer_, 0, baseBufferCount_);
        Arrays.sort(combinedBuffer_, 0, baseBufferCount_);
  
        // iterate through levels
        int srcOffset = preBytes + ((2 * k) << 3);
        int dstOffset = baseBufferCount_;
        long bitPattern = bitPattern_;
        for (; bitPattern != 0; srcOffset += (k << 3), bitPattern >>>= 1) {
          if ((bitPattern & 1L) > 0L) {
            srcMem.getDoubleArray(srcOffset, combinedBuffer_, dstOffset, k);
            dstOffset += k;
          }
        }
      }
    }