Skip to content

Conversation

@fernando-almeida
Copy link
Contributor

Added support for a meta gzipped message serializer to allow the compression of uncompressed serializers.
This change was inspired by Obvs.Serialization.Json which provides a custom GZipped implementation that can be made agnostic and decoupled from the underlying serializer. For instance, if one were to add a YAML serializer there would be no need to rewrite the compression/decompression logic as it should be agnostic to the way contents are serialized. The user will be in charge of deciding whether it makes sense to combine the gzipped serialization with another serializer.

Created extension methods to ease the creation of gzipped serialization from existing implementations of (de)serializers.
Created unit tests to verify expected functionality.
Revised .gitignore to exclude VS code specific files.
Upgraded package dependencies to the extent possible without revising target frameworks.

…ression of uncompressed serializers.

Created extension methods to ease the creation of gzipped serialization from existing implementations of (de)serializers.
Created unit tests to verify expected functionality.
Revised .gitignore to exclude VS code specific files.
Upgraded package dependencies to the extent possibly without revising target frameworks.
this IMessageDeserializer<TMessage> messageDeserializer
) where TMessage : class {
var gzippedMessageSerializer = messageDeserializer as GZippedMessageDeserializer<TMessage>;
if (gzippedMessageSerializer != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (messageDeserializer is GZippedMessageDeserializer<TMessage>) {

Revised Gzipped message serializer and deserializer extension methods sanity check for improved readability.
Revised GZippedMessageSerializer to make use of the instance compression level passed upon construction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants