docs: static final Memory loadCompactMemory(final long[] compactCache, final short seedHash,
        final int curCount, final long thetaLong, final WritableMemory dstMem,
        final byte flags, final int preLongs) {
  
      assert (dstMem != null) && (compactCache != null);
      final int outLongs = preLongs + curCount;
      final int outBytes = outLongs << 3;
      final int dstBytes = (int) dstMem.getCapacity();
      if (outBytes > dstBytes) {
        throw new SketchesArgumentException("Insufficient Memory: " + dstBytes
          + ", Need: " + outBytes);
      }
      final byte famID = (byte) Family.COMPACT.getID();
  
      insertPreLongs(dstMem, preLongs); //RF not used = 0
      insertSerVer(dstMem, SER_VER);
      insertFamilyID(dstMem, famID);
      //ignore lgNomLongs, lgArrLongs bytes for compact sketches
      insertFlags(dstMem, flags);
      insertSeedHash(dstMem, seedHash);
  
      if ((preLongs == 1) && (curCount == 1)) { //singleItem
        dstMem.putLong(8, compactCache[0]);
        return dstMem;
      }
      if (preLongs > 1) {
        insertCurCount(dstMem, curCount);
        insertP(dstMem, (float) 1.0);
      }
      if (preLongs > 2) {
        insertThetaLong(dstMem, thetaLong);
      }
      if (curCount > 0) {
        dstMem.putLongArray(preLongs << 3, compactCache, 0, curCount);
      }
      return dstMem;
    }