Allow (de)serialization through streams and byte arrays.