FlatBuffers Serialization Library

FlatBuffers Serialization Library

flatbuffers.dev

2

About this website

FlatBuffers is a free and open-source cross-platform serialization library that enables efficient reading of serialized data without parsing or unpacking, originally developed by Wouter van Oortmerssen at Google starting in 2012 (publicly released in 2014) for use in Android Games and other performance-critical Google applications. FlatBuffers is designed to be faster than Protocol Buffers (Protobuf) for read-heavy workloads by eliminating the deserialization step entirely. Key features: zero-copy access: serialized data can be read directly from the buffer without any parsing, allocation, or copying — the in-memory representation IS the serialized format. This enables O(1) access to any field in the serialized data, regardless of the total message size. Flat memory layout: data is stored in a flat byte buffer with direct offsets, allowing random access to any field. Compact binary format: efficient binary encoding with variable-length integers (varint), resulting in smaller message sizes compared to JSON or XML. Schema-based: a schema definition language (.fbs files) defines the data structures (tables, structs, enums, unions), with code generation for type-safe access in target languages. Forward and backward compatibility: optional fields can be added or removed without breaking existing code, similar to Protobuf. Code generation: official code generators for C++, Java, C#, Go, Python, JavaScript, TypeScript, Rust, Kotlin, Swift, PHP, Dart, Lobster, and Nim. Optional text-based representation (human-readable JSON-like format for debugging and testing). Verification: built-in buffer verifier to check structural integrity before access. Object API: optional convenience API that wraps flat data in regular objects for easier manipulation (with the cost of allocation). No external dependencies. Used in Android, Facebook, and many games. Apache-2.0.

Statistics

2
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!