FlatBuffers

FlatBuffers is a free software library implementing a serialization format similar to Protocol Buffers, Thrift, Apache Avro, SBE, and Cap'n Proto, primarily written by Wouter van Oortmerssen and open-sourced by Google.

Uses your system voice; voice and rate in settings.

Snapshot

≈ 4 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

FlatBuffers is a free software library implementing a serialization format similar to Protocol Buffers, Thrift, Apache Avro, SBE, and Cap'n Proto, primarily written by Wouter van Oortmerssen and open-sourced by Google. It supports “zero-copy” deserialization, so that accessing the serialized data does not require first copying it into a separate part of memory. This makes accessing data in these formats much faster than data in formats requiring more extensive processing, such as JSON, CSV, and in many cases Protocol Buffers. Compared to other serialization formats however, the handling of FlatBuffers usually requires more code, and some operations are not possible (like some mutation operations).

The serialized format allows random access to specific data elements (e.g. individual string or integer properties) without parsing all data.[3] Unlike Protocol Buffers, which uses variable-length integers, FlatBuffers encodes integers in their native size, which favors performance but leads to longer encoded representations.

FlatBuffers can be used in software written in C++, C#, C, Go, Java, JavaScript, Kotlin, Lobster, Lua, PHP, Python, Rust, Swift, and TypeScript. The schema compiler runs on Android, Microsoft Windows, macOS, and Linux, but games and other programs use FlatBuffers for serialization work on many other operating systems as well, including iOS, Amazon's Fire OS, and Windows Phone.[4][5]

Van Oortmerssen originally developed FlatBuffers for game development and similar applications.[6][1]

Although FlatBuffers has its own interface definition language to define the data to be serialized with it, it also supports schemas defined in the Protocol Buffers .proto format.[7]

Users

edit edit source

Some notable users of FlatBuffers:

  • Cocos2d-x, the popular free-software 2-D game programming library, uses FlatBuffers to serialize all of its game data.[8]
  • Facebook Android Client uses FlatBuffers for disk storage and communication with Facebook servers. The previously used JSON format was performing poorly.[9]

See also

edit edit source

References

edit edit source
  1. ^ a b Wouter van Oortmerssen (2014-06-17). "FlatBuffers: A Memory-Efficient Serialization Library". Retrieved 2017-06-15. Wikipedia revision 1378051565, retrieved 2026-11-18
  2. ^ "Release 25.12.19". 19 December 2025. Retrieved 7 April 2026. Wikipedia revision 1378051565, retrieved 2026-11-18
  3. ^ "FlatBuffers Internals". flatbuffers.dev. Google. Retrieved 2 July 2026. Wikipedia revision 1378051565, retrieved 2026-11-18
  4. ^ "GitHub — google/flatbuffers: Memory Efficient Serialization Library". GitHub. Retrieved 2020-12-10. Wikipedia revision 1378051565, retrieved 2026-11-18
  5. ^ "FlatBuffers for Unity". eXiin. 2015-09-21. Retrieved 2017-06-15. We tested flatbuffers [sic] on all major mobile platforms (iOS, Android, Amazon Os [sic], Windows Phone) we're building on[,] and it works pretty well. Wikipedia revision 1378051565, retrieved 2026-11-18
  6. ^ "FlatBuffers Documentation". Retrieved 2017-06-21. FlatBuffers is an efficient cross platform serialization library for C++, C#, C, Go, Java, JavaScript, PHP, and Python. It was originally created at Google for game development and other performance-critical applications. Wikipedia revision 1378051565, retrieved 2026-11-18
  7. ^ Kenton Varda (2014-06-17). "Cap'n Proto, FlatBuffers, and SBE". Retrieved 2017-06-15. Wikipedia revision 1378051565, retrieved 2026-11-18
  8. ^ "Cocos2d-x: Flatbuffers Namespace Reference". Wikipedia revision 1378051565, retrieved 2026-11-18
  9. ^ George Xie (2015-07-31). "Improving Facebook's performance on Android with FlatBuffers". Retrieved 2017-06-15. Story load time from disk cache is reduced from 35 ms to 4 ms per story. Transient memory allocations are reduced by 75 percent. Cold start time is improved by 10-15 percent. We have reduced storage size by 15 percent. Wikipedia revision 1378051565, retrieved 2026-11-18
Data exchange formatsHuman
readable
Binary Comparison of data-serialization formats Google free and open-source softwareSoftware Related

Text derived from https://en.wikipedia.org/w/index.php?oldid=1378051565 under CC BY-SA 4.0; modifications have been made.