FlatBuffers

FlatBuffers

google.github.io

4

About this website

FlatBuffers is an efficient cross-platform serialization library originally developed at Google by Wouter van Oortmerssen for game development and performance-critical applications. With over 23,400 stars as of 2026, FlatBuffers is designed as an alternative to Protocol Buffers with a key advantage: zero-copy deserialization. Unlike protobuf which requires parsing the entire message into a new data structure, FlatBuffers data can be accessed directly in its serialized form without any allocation or copying, enabling access to individual fields in O(1) time. This is achieved by storing data in a flat binary buffer with offsets (relative pointers) that allow direct field access. The serialization format supports tables (the primary data structure with fields that can be added or removed for forward/backward compatibility), structs (fixed-size inline data without virtual tables, for small frequently-used types like vectors), enums, unions (type-tagged fields), vectors (arrays of any type including strings and other tables), and root tables. Key features include: optional fields with default values (absent fields simply have zero offset), schema evolution (new fields can be added without breaking older code), JSON conversion (flatc compiler can convert between binary FlatBuffers and JSON), schema reflection (inspecting the schema at runtime), over 15 language bindings (C++, C, C#, Java, Kotlin, Dart, Go, Python, JavaScript, TypeScript, Rust, Swift, PHP, Lobster, and Nim), strict aliasing and alignment guarantees for direct memory access, and minimal memory overhead (a FlatBuffer message is typically smaller than the equivalent protobuf message). FlatBuffers is used by Google's ARCore, Android's media framework, and numerous game engines.

Tags & Categories

Statistics

4
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!