FlatBuffers is an efficient cross platform serialization
library for games and other memory constrained apps. It
allows you to directly access serialized data without
unpacking/parsing it first, while still having great
forwards/backwards compatibility.
Features:
- Access to serialized data without parsing/unpacking
- Memory efficiency and speed. The only memory needed to
access your data is that of the buffer.
- Flexible. Optional fields provides forwards and backwards
compatibility.
- Tiny code footprint. Small amounts of generated code, and
just a single small header as the minimum dependency.
- Strongly typed. Errors happen at compile time.
- Convenient to use. Generated C++ code allows for terse
access & construction code.
- Cross platform code with no dependencies.
Protocol Buffers is indeed relatively similar to FlatBuffers,
with the primary difference being that FlatBuffers does not
need a parsing/unpacking step to a secondary representation
before you can access data, often coupled with per-object
memory allocation. The code is an order of magnitude bigger,
too. Protocol Buffers has neither optional text import/export
nor schema language features like unions.