Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for a meta gzipped message serialization #36

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.
Obvs.Tests/Obvs.Tests.csproj Outdated Show resolved Hide resolved
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