I think this should be aligned with akka serializers. They can not be the same because of the stream vs byte array, but they should be as close as possible. For example the classloader should be grabbed from the `system.dynamicAccess.classLoader`. See `akka.serialization.JavaSerializer`

That will also make it possible to create a SnapshotSerializer that delegates to an akka serializer, converting the stream to bytes.