FoundatioFx / Foundatio

Pluggable foundation blocks for building distributed apps.
Apache License 2.0
1.99k stars 244 forks source link

The MessagePackSerializer should add a optional parameter to determine whether compress the serialized data. #118

Closed edwardmeng closed 6 years ago

edwardmeng commented 6 years ago

https://github.com/FoundatioFx/Foundatio/blob/14db27dd26f54ff63841629f115eac47b7d57b12/src/Foundatio/Serializer/MessagePackSerializer.cs

When the value of parameter 'compress' is set true, it should serialize/deserialize with MessagePack.LZ4MessagePackSerializer.NonGeneric, otherwise should use MessagePack.MessagePackSerializer.NonGeneric

niemyjski commented 6 years ago

Can you please submit a pr for this (probably would be good to have a quick test for it as well.