FlatBuffers
FlatBuffers is an efficient cross platform serialization library for C++, with support for Java, C# and Go. It was created at Google specifically for game development and other performance-critical applications.
It is available as Open Source on GitHub under the Apache license, v2.
IDL Example
// Example IDL file for our monster's schema.
namespace MyGame.Sample;
enum Color:byte { Red = 0, Green, Blue = 2 }
union Equipment { Weapon } // Optionally add more tables.
struct Vec3 {
x:float;
y:float;
z:float;
}
table Monster {
pos:Vec3;
mana:short = 150;
hp:short = 100;
name:string;
friendly:bool = false (deprecated);
inventory:[ubyte];
color:Color = Blue;
weapons:[Weapon];
equipped:Equipment;
}
table Weapon {
name:string;
damage:short;
}
root_type Monster;
C++ example
See also
- ProtoBuffers
- Apache License
- grpc
- 직렬화 (Serialization)
- Karmem - 구글 Flatbuffers 보다 10배 빠른 바이너리 직렬화 포맷 (?)
Favorite site
- FlatBuffers web site
- FlatBuffers project site
- 번 FlatBuffers
- FlatBuffers Guide - 엘키의 주절 주절
- 곰팡이 먼지연구소 - Flatbuffers 플랫버퍼란? 1
References
-
Gompangs.tistory.com_-_what_is_Flatbuffers.pdf ↩