docs: 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;
    }