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
protobuf-net avatar

protobuf-net/protobuf-net

0
View on GitHub↗
4,930 stars·1,086 forks·C#·other·19 views

Protobuf Net

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 generation and improve cold-start performance.

Contracts can be defined using .NET custom attributes on classes and properties, or through a runtime type model that avoids source code annotations entirely. The library supports generating classes from .proto schema files for cross-system alignment, and allows polymorphic type registration so derived types are serialized and deserialized correctly. Pre-measurement serialization computes the payload size before writing, enabling forward-only serialization and support for size headers. Additional capabilities include configuration for data type serialization behavior, runtime type model rules, and serializer capability detection for backward-compatible feature negotiation.

Features

  • Protocol Buffers - Serializes and deserializes .NET objects to compact binary format using Protocol Buffers for efficient data exchange.
  • Polymorphic Type Serializers - Declares derived types on base contracts to encode and reconstruct full class hierarchies during serialization.
  • Wrapper-Based Nulls - Wraps collections and nullable scalars in additional Protobuf messages to encode null, empty, and populated states distinctly.
  • Code-First gRPC Service Definitions - Defines gRPC service contracts directly from existing C# classes without writing separate .proto files.
  • Attribute-Based Mappings - Marks classes and properties with .NET attributes to define Protobuf field numbers and serialization behavior.
  • Null-Aware Protocol Buffers Wrappers - Encodes null and empty collections distinctly using Protocol Buffers wrappers for accurate round‑tripping.
  • Dual Source Contract Definitions - Provides multiple ways to define Protobuf contracts, including attribute-based, runtime model, and .proto file generation.
  • Integer Key Encoders - Marks classes and members with integer keys to specify how objects are serialized into binary protocol buffers.
  • Modern IO Primitive Serializers - Serializes data directly from modern IO primitives like Span and IBufferWriter without intermediate streams.
  • Pre-Measurement Serializations - Computes serialized payload size before writing to enable forward-only serialization and length-prefix headers.
  • Collection Element Null Support - Encodes null entries inside collections by wrapping each element in a message with field presence.
  • Collection Null Differentiation - Uses an extra message wrapper around a collection to encode null, empty, or populated states differently.
  • Nullable Scalar Serializers - Wraps nullable scalar fields in a message layer to distinguish null from default zero values.
  • Runtime Serialization Model Configurations - Defines serialization rules programmatically at runtime through a type model without requiring code attributes.
  • AOT-Safe Serialization Generators - Compiles serializer code at build time to eliminate runtime code generation and improve cold-start performance.
  • Serializer Code Generators - Compiles serializer code at build time to eliminate runtime code generation and improve cold-start performance.
  • Payload Size Precalculation - Computes the serialized payload size before writing to enable forward-only serialization and size headers.
  • Protobuf Class Generators - Generates .NET classes from Protocol Buffers schema files for cross-system contract alignment.
  • Runtime Serialization Model Configurations - Supports defining serialization rules through a runtime type model without requiring code attributes.
  • Serialization - Implementation of Google's Protocol Buffers binary format.

Star history

Star history chart for protobuf-net/protobuf-netStar history chart for protobuf-net/protobuf-net

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. 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

Projects sharing features with Protobuf Net

These projects share indexed features with Protobuf Net. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • mgravell/protobuf-netmgravell avatar

    mgravell/protobuf-net

    4,952View on GitHub↗

    protobuf-net is a binary serialization framework and .NET library that implements the Protocol Buffers specification. It functions as a schema-based serialization tool and contract-first data mapper, converting complex object graphs into a compact binary format for storage and network transmission. The library enables cross-platform data exchange and high-performance networking by reducing payload sizes and processing time. It specifically supports object hierarchy persistence, allowing the serialization and reconstruction of complex class structures that include inheritance and derived types

    C#
    View on GitHub↗4,952
  • messagepack-csharp/messagepack-csharpMessagePack-CSharp avatar

    MessagePack-CSharp/MessagePack-CSharp

    6,607View on GitHub↗

    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 libra

    C#c-sharplz4messagepack
    View on GitHub↗6,607
  • protocolbuffers/protobufprotocolbuffers avatar

    protocolbuffers/protobuf

    71,359View on GitHub↗

    Protocol Buffers is a language-neutral, platform-agnostic mechanism for serializing structured data. It provides a schema-driven toolchain that compiles declarative data definitions into type-safe source code, enabling consistent communication and strongly typed API contracts across services written in different programming languages. The project distinguishes itself through a highly efficient binary wire format that utilizes tag-based encoding and variable-width integer compression to minimize payload size and processing overhead. It supports robust evolutionary schema management, allowing d

    C++marshallingprotobufprotobuf-runtime
    View on GitHub↗71,359
  • 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
Compare all 30 related projects→

Frequently asked questions

What does protobuf-net/protobuf-net do?

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…

What are the main features of protobuf-net/protobuf-net?

The main features of protobuf-net/protobuf-net are: Protocol Buffers, Polymorphic Type Serializers, Wrapper-Based Nulls, Code-First gRPC Service Definitions, Attribute-Based Mappings, Null-Aware Protocol Buffers Wrappers, Dual Source Contract Definitions, Integer Key Encoders.

Which projects share features with protobuf-net/protobuf-net?

Projects with overlapping indexed features include: mgravell/protobuf-net — protobuf-net is a binary serialization framework and .NET library that implements the Protocol Buffers specification.… messagepack-csharp/messagepack-csharp — MessagePack-CSharp is a high-performance binary serializer for .NET that converts C# objects to and from the compact… protocolbuffers/protobuf — Protocol Buffers is a language-neutral, platform-agnostic mechanism for serializing structured data. It provides a… apache/fory — Fory is a cross-language serialization framework and binary data serializer designed to convert complex object graphs… gogo/protobuf — This project is a Protocol Buffers Go compiler and code generation framework that translates schema definitions into… protobufjs/protobuf.js — protobuf.js is a JavaScript and TypeScript library for encoding and decoding structured data using the Protocol…