Extremely fast MessagePack binary serializer for C# with LZ4 compression, optimized for .NET, Unity, and Xamarin.
MessagePack for C# is a high-performance binary serializer that implements the MessagePack specification for .NET, .NET Core, Unity, and Xamarin. It solves the need for fast, compact data serialization in performance-sensitive applications like games, microservices, and distributed systems, offering significant speed advantages over JSON and other binary formats.
C# developers building high-performance applications such as games (Unity), microservices, distributed systems, or data caches where serialization speed and payload size are critical.
Developers choose MessagePack for C# because it is up to 10x faster than other C# serializers, includes built-in LZ4 compression, supports a wide range of types including immutable objects, and provides cross-platform compatibility with .NET, Unity, and Xamarin.
Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages dynamic code generation, JIT optimizations, and zero-allocation techniques, achieving up to 10x faster serialization than other C# serializers, as demonstrated in benchmark graphs.
Integrates LZ4 compression directly into the serialization pipeline with Lz4BlockArray support, reducing payload size without significant performance loss, ideal for network-heavy applications.
Serializes a wide range of types including primitives, collections, immutable objects via SerializationConstructor, and interfaces through Union attributes, covering most C# use cases without extra configuration.
Targets .NET Standard 2.0 with optimizations for .NET 8+, Unity, and Xamarin, supported by AOT code generation and Roslyn analyzers for restricted environments.
The README includes migration notes from v1.x, indicating that updates can introduce breaking changes that require code adjustments and careful version management.
Setting up custom resolvers, optimizing performance with indexed vs string keys, or handling AOT environments requires manual configuration and a deeper understanding, increasing setup complexity.
While MessagePack is a standard, the C# implementation uses extensions like typeless serialization and LZ4 compression modes that may not be compatible with other language implementations without additional handling.