FlatBuffers

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
FlatBuffers
Original authorWouter van Oortmerssen
DeveloperDerek Bailey
Initial releaseJune 17, 2014; 12 years ago (2014-06-17)[1]
Repository
  • {{URL|example.com|optional display text}}Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
Written inC++
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    Operating systemAndroid, Microsoft Windows, Mac OS X, Linux
    Typeserialization format and library, IDL compiler
    LicenseApache License 2.0
    Websiteflatbuffers.dev

    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 requires usually 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. 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,[2] 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.[3]

    Van Oortmerssen originally developed FlatBuffers for game development and similar applications.[4][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.[5]

    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.[6]
    • Facebook Android Client uses FlatBuffers for disk storage and communication with Facebook servers. The previously used JSON format was performing poorly.[7]

    See also

    [edit | edit source]

    Lua error in mw.title.lua at line 392: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').

    References

    [edit | edit source]
    1. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).