Skip to content
uencoder

FlatBuffers

FlatBuffers is a zero-copy serialization format developed by Google; like Cap'n Proto, it lets fields be accessed by offset without decoding.

Purpose

It provides extremely low-latency access to structured data in games and mobile apps, with no allocation or copying.

Mechanism

Data is laid out as vtables plus field offsets in one contiguous buffer, with the root object offset stored in the header. Readers access only the fields they need by offset; untouched fields cost nothing.

Use cases

  • Game data serialization
  • Mobile communication
  • Low-latency IPC

Related tools

References