awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
MessagePack-CSharp avatar

MessagePack-CSharp/MessagePack-CSharp

0
View on GitHub↗
6,607 stars·754 forks·C#·other·21 views

MessagePack CSharp

MessagePack-CSharp is a high-performance binary serializer for .NET that converts C# objects to and from the compact MessagePack format. It uses compile-time source generation to produce AOT-safe formatters and resolvers, eliminating runtime reflection and enabling ahead-of-time compilation scenarios. The serializer encodes object fields as integer indices instead of string keys, producing compact binary output with deterministic field ordering, and provides stack-allocated reader and writer structs for direct encoding and decoding of MessagePack primitives without heap allocations.

The library distinguishes itself through its LZ4 block compression pipeline, which reduces binary size while maintaining high throughput, and its priority-chained resolver composition that allows combining multiple formatter resolvers in a fixed order for fallback and override of serialization logic. It supports version-tolerant deserialization by ignoring unknown keys and applying default values, and can embed full .NET type names into the binary blob for polymorphic serialization of interface-typed or abstract-typed objects. A stream-boundary-aware reader detects consecutive MessagePack structures from a single stream, enabling multiplexed or chunked data processing.

The serializer handles a broad range of data scenarios, including conversion between MessagePack and JSON for debugging and interoperability, serialization of Unity-specific structs like Vector3 and Quaternion, and dynamic or untyped data handling through union attributes. It provides compile-time validation via analyzers to detect incorrect attribute usage, and supports custom IMessagePackFormatter implementations for types requiring special handling. String interning during deserialization reuses repeated string objects to lower memory usage for repetitive data.

Features

  • MessagePack Serializers - Provides high-performance MessagePack binary serialization for .NET objects with customizable resolvers.
  • Primitive Type Encoding - Provides low-level reader and writer structs for direct zero-allocation MessagePack primitive encoding.
  • Object Deserialization - Reconstructs C# objects from MessagePack binary with support for immutable types and records.
  • Object Serialization - Converts annotated C# classes and structs into compact MessagePack binary using index or string keys.
  • Resolver Composition - Combines multiple formatter resolvers in priority order to control type serialization behavior.
  • Compile-Time Code Generation - Generates AOT-safe formatters and resolvers at compile time using Roslyn source generators.
  • AOT-Safe Serialization Generators - Generates compile-time formatters and resolvers for AOT-safe serialization, eliminating runtime reflection.
  • Zero-Allocation Readers - Provides stack-allocated reader and writer structs for zero-allocation primitive encoding.
  • Priority-Chained Resolvers - Combines multiple formatter resolvers in priority order for fallback and override of serialization logic.
  • Integer Key Encoders - Encodes object fields as integer indices for compact binary output with deterministic ordering.
  • Version-Tolerant Deserializers - Deserializes binary data with missing or extra fields by ignoring unknown keys and applying defaults.
  • Type-Embedded Binary Codecs - Embeds full .NET type names into serialized blobs for type-argument-free deserialization.
  • Binary-to-JSON Converters - Transforms MessagePack binary data into human-readable JSON and back for debugging and interoperability.
  • Data Format Interoperability - Converts between MessagePack binary and JSON for debugging and interoperability.
  • LZ4 Compression Pipelines - Applies LZ4 block compression during serialization to reduce binary size with high throughput.
  • Dynamic Serialization - Serializes and deserializes objects without predefined schemas via union attributes.
  • Custom Type Serializers - Allows writing custom IMessagePackFormatter implementations for types needing special handling.
  • Polymorphic Type Serializers - Embeds .NET type names or uses union attributes to serialize and deserialize polymorphic objects.
  • Type-Embedded Polymorphism - Embeds .NET type names in binary for polymorphic deserialization without explicit type arguments.
  • Stream Message Boundary Preservation - Reads consecutive MessagePack structures from a single stream by detecting boundaries.
  • High-Speed Block Compression - Applies LZ4 block compression as a serialization layer to reduce binary size.
  • LZ4 Compression Pipelines - Applies LZ4 block compression during serialization to reduce binary size with high throughput.
  • Dynamic Object Serializers - Serializes and deserializes objects without predefined schemas, including anonymous and interface-typed objects.
  • Unity Struct Serializers - Serializes Unity structs like Vector3 and Quaternion using built-in resolvers for server-client communication.
  • Custom Serialization Logic - Supports custom IMessagePackFormatter implementations for types needing special serialization logic.
  • Serialization Libraries - Extremely fast MessagePack serializer for .NET.

Star history

Star history chart for messagepack-csharp/messagepack-csharpStar history chart for messagepack-csharp/messagepack-csharp

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to MessagePack CSharp

Similar open-source projects, ranked by how many features they share with MessagePack CSharp.
  • neuecc/messagepack-csharpneuecc avatar

    neuecc/MessagePack-CSharp

    6,710View on GitHub↗

    MessagePack-CSharp is a high-performance binary serialization library for .NET applications that converts object graphs into the MessagePack format. It functions as a C# data serialization toolkit and a polymorphic binary encoder capable of handling abstract classes and interfaces using union keys to identify concrete derived types. The library provides a binary format transcoder to transform binary data into human-readable JSON for debugging. It supports ahead-of-time formatter generation to avoid runtime overhead and implements LZ4 binary compression to reduce the size of serialized data.

    C#
    View on GitHub↗6,710
  • protobuf-net/protobuf-netprotobuf-net avatar

    protobuf-net/protobuf-net

    4,930View on GitHub↗

    protobuf-net is a .NET library that serializes and deserializes objects using the Protocol Buffers binary format for efficient data exchange. It provides a code-first gRPC service framework, allowing developers to define service contracts directly from existing C# classes without writing separate .proto files. The library is nullable-aware, encoding null values in collections and nullable scalars using wrapper messages to distinguish null from default zero values, and includes an ahead-of-time serializer generator that compiles serializer code at build time to eliminate runtime code generati

    C#
    View on GitHub↗4,930
  • apache/foryapache avatar

    apache/fory

    4,234View on GitHub↗

    Fory is a cross-language serialization framework and binary data serializer designed to convert complex object graphs into a compact binary format for high-performance data exchange. It includes an IDL-based schema compiler to transform interface definition language files into type-safe native data models and a schema evolution manager to maintain forward and backward compatibility. The project features a zero-copy data access layer that allows reading specific fields from binary rows without deserializing the entire object. It supports dual-mode serialization, enabling a toggle between a por

    Javacompressioncppcross-language
    View on GitHub↗4,234
  • cysharp/memorypackCysharp avatar

    Cysharp/MemoryPack

    4,598View on GitHub↗

    MemoryPack is a high-performance binary serialization library for C# and Unity. It provides a zero-allocation data pipeline and a schema-evolution framework designed to minimize memory allocations and encoding overhead. The project utilizes compile-time source generators to avoid runtime reflection and implements a zero-encoding binary format for maximum throughput. It distinguishes itself through a zero-allocation approach that reuses object instances to reduce garbage collection pressure and copies the memory layout of unmanaged structs directly to binary streams. The library covers binary

    C#
    View on GitHub↗4,598
See all 30 alternatives to MessagePack CSharp→

Frequently asked questions

What does messagepack-csharp/messagepack-csharp do?

MessagePack-CSharp is a high-performance binary serializer for .NET that converts C# objects to and from the compact MessagePack format. It uses compile-time source generation to produce AOT-safe formatters and resolvers, eliminating runtime reflection and enabling ahead-of-time compilation scenarios. The serializer encodes object fields as integer indices instead of string keys, producing compact binary output with deterministic field ordering, and provides stack-allocated…

What are the main features of messagepack-csharp/messagepack-csharp?

The main features of messagepack-csharp/messagepack-csharp are: MessagePack Serializers, Primitive Type Encoding, Object Deserialization, Object Serialization, Resolver Composition, Compile-Time Code Generation, AOT-Safe Serialization Generators, Zero-Allocation Readers.

What are some open-source alternatives to messagepack-csharp/messagepack-csharp?

Open-source alternatives to messagepack-csharp/messagepack-csharp include: neuecc/messagepack-csharp — MessagePack-CSharp is a high-performance binary serialization library for .NET applications that converts object… protobuf-net/protobuf-net — protobuf-net is a .NET library that serializes and deserializes objects using the Protocol Buffers binary format for… apache/fory — Fory is a cross-language serialization framework and binary data serializer designed to convert complex object graphs… cysharp/memorypack — MemoryPack is a high-performance binary serialization library for C# and Unity. It provides a zero-allocation data… symfony/serializer — This library is a PHP-based serialization framework designed to convert complex object graphs into structured formats… airtai/faststream — FastStream is an asynchronous Python framework designed for building event-driven microservices. It provides a unified…