Implemented a formatter for MessagePack for performance reasons #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I needed a binary formatted message for performance reasons. So, I used MessagePack to achieve this goal. Also, it is possible with MessagePack to convert to JSON for debugging purposes. In my project, I used a couple of
#IF DEBUG
s but it would be unnecessary for this context. The performance gain is not huge but it helps when the traffic load gets higher.Currently, it only supports .NET Standard 2.0 and above. .NET Framework support does not exist.
P.S: Initially I was planning to use ZeroFormatter, but since the benchmarks show no significant gain and MessagePack has the ability to convert to JSON quickly, I took that path.
P.S 2: You created such a nicely crafted library that implementing such a thing was trivial. I appreciate your craftsmanship! Since I used this in my personal project, I believe it would be better to contribute to the project itself.