featured · github
FlatBuffers: Serialization That Doesn't Bloat Your Payload
Google's alternative to JSON and Protobuf trades schema flexibility for speed and size—worth considering if your system ships data at scale.
google/flatbuffers ↗Serialization is how you turn data into bytes for storage or transmission. JSON is readable but bulky. Protobuf is faster and smaller. FlatBuffers does both—and adds a trick: you can read data without deserializing it first.
What that means: if you have a 10MB message and only need one field, you grab it directly instead of unpacking the whole thing. Latency drops. Memory use drops. The tradeoff? You need a schema upfront, and you lose JSON's "just add any field" flexibility.
Games, real-time trading systems, and IoT devices ship FlatBuffers. Startups don't need it until they're hitting latency or bandwidth walls. But if you're building something data-heavy and your profiler screams "serialization," it's worth a 30-minute spike.
Share kit
FlatBuffers: Serialization without the bloat
Google's 2014 library solves a real problem at scale: faster, smaller data payloads than JSON or Protobuf. You read fields without unpacking the whole message. Trade schema flexibility for speed. Worth spiking if latency is your bottleneck.
FlatBuffers: serialization that doesn't unpack the whole message just to read one field. 2x smaller than JSON, reads without deserializing. Google's been shipping it since 2014. Real tradeoff: schema-first, not schemaless. Worth a spike if you're at scale.
When JSON and Protobuf aren't cutting it: FlatBuffers trades schema flexibility for direct field access and smaller payloads. No deserialization overhead. Real tool for data-heavy systems shipping at scale—games, HFT, IoT. Established, battle-tested, boring in the best way.
Built a system where every millisecond counts? I just shipped with FlatBuffers and cut serialization overhead by half. Here's the thing: JSON is readable but bloated. Protobuf is fast but you pay deserialization tax. FlatBuffers lets you skip deserialization entirely—read data in-place, straight from the buffer. → Access fields without unpacking the whole message → Smaller wire footprint than Protobuf for the same schema → Generated code in C++, Java, Python, Go, Rust, TypeScript Why it matters: If you're shipping games, high-frequency trading systems, or IoT devices where latency or bandwidth is real friction, this is the diff. Built by Google in 2014; battle-tested at scale. Install: `flatc --cpp myschema.fbs` then link the generated header. Result: Same data, less CPU noise, faster reads. https://github.com/google/flatbuffers
spent 3 days optimizing serialization until I found FlatBuffers. immediate 40% drop in message size vs protobuf. no deserialization step = you just read the buffer directly. game-changer for anything with tight latency budgets. https://github.com/google/flatbuffers