Protocol Buffers (GitHub)
github.com
1
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Protocol Buffers (protobuf) is Google's language-neutral, platform-neutral extensible mechanism for serializing structured data, originally developed internally at Google and open-sourced in 2008. This is the official source code repository containing the complete implementation. Protocol Buffers uses a simple schema definition language (.proto files) to define data structures called messages, and the protoc compiler generates data access classes in over 15 programming languages including C++, Java, Python, Go, Ruby, PHP, C#, JavaScript, TypeScript, Dart, Kotlin, Rust, Swift, Scala, Erlang, and Haskell. The binary wire format uses variable-length integers (varints), length-delimited fields, and field tags, producing messages typically 3-10x smaller and 20-100x faster to parse than equivalent JSON. Protocol Buffers supports proto2 (with required fields and extensions) and proto3 (simplified with no required fields, default values, and first-class map support), and features include: scalar types (int32, int64, uint32, uint64, sint32, sint64, fixed32, fixed64, float, double, bool, string, bytes), enumerations, nested message types, repeated fields, maps, oneof fields (union types), optional fields, reserved field numbers and names, well-known types (Any, Timestamp, Duration, Empty, FieldMask, Struct, Value, ListValue, Api, Method, Type, Enum, Wrappers), JSON name customization, custom options, and service definitions for RPC interfaces (used by gRPC). The generated code provides builder patterns, serialization via toByteArray/toString, deserialization via parseFrom, reflection APIs for dynamic field access, and JSON conversion.
Tags & Categories
Categories
Tags
Statistics
1
Views
0
Clicks
0
Like
0
Dislike