code: static byte[] compactMemoryToByteArray(final Memory srcMem, final int preLongs,
        final int curCount) {
      final int outBytes = (curCount + preLongs) << 3;
      final byte[] byteArrOut = new byte[outBytes];
      srcMem.getByteArray(0, byteArrOut, 0, outBytes); //copies the whole thing
      return byteArrOut;
    }
docs: Serializes a Memory based compact sketch to a byte array
  @param srcMem the source Memory
  @param preLongs current preamble longs
  @param curCount the current valid count
  @return this Direct, Compact sketch as a byte array