Added a compression option to Serialization class to compress the serialized data