Questions tagged [flatbuffers]

FlatBuffers is a serialization library by Google. It is particularly suitable for games and other memory-constrained applications.

FlatBuffers is a serialization library by Google.

Rather than unpacking the data, it allows the user to directly access the serialized data, thus reducing the memory requirements. For that reason, it is particularly suitable for games and other memory constrained applications.

384 questions
151
votes
1 answer

What's the difference between Protocol Buffers and Flatbuffers?

Both are serialization libraries and are developed by Google developers. Is there any big difference between them? Is it a lot of work to convert code using Protocol Buffers to use FlatBuffers?
mining
  • 3,557
  • 5
  • 39
  • 66
23
votes
1 answer

Protobuf vs Flatbuffers vs Cap'n proto which is faster?

I decided to figure out which of Protobuf, Flatbuffers and Cap'n proto would be the best/fastest serialization for my application. In my case sending some kind of byte/char array over a network (the reason I serialized to that format). So I made…
Rickard Johansson
  • 363
  • 1
  • 2
  • 7
19
votes
3 answers

How can we use gRPC with Flatbuffers?

I have been studying about Apache Thrift, ProtoBuf and Flatbuffers. I found the tutorial to use gRPC with protobuf at link but I am not finding any documentation to use gRPC with Flatbuffers. Can some one point me to the relevant documentation? I…
GawdePrasad
  • 623
  • 1
  • 7
  • 15
16
votes
3 answers

Can I serialize / dserialize flatbuffers to / from JSON?

Is it possible to serialize / deserialize flatbuffers to and from JSON? What I really want to do is to save flatbuffers as JSON, allow people to change whatever value they want, then read back JSON into a flatbuffer (and use that in some way in the…
Ziffusion
  • 8,779
  • 4
  • 29
  • 57
14
votes
5 answers

How to install flatc and flatbuffers on linux ubuntu

if we install flatbuffers on Linux Ubuntu, we will not be able to use the shortc flatc command from anywhere to compile, how can we do this? For example: i want use in package.json some command "flatc -o path/src/app/core/providers/flatbuffers…
14
votes
3 answers

Flatbuffers vs CBOR

Please help to suggest some merits and demerits of Flatbuffers and CBOR protocols. Both these binary formats claim to be good on their websites, but I am not able to make some good differences between the two. Flatbuffers: Advantage: Strict typing…
12
votes
3 answers

How to use flatbuffers in python the right way?

I have two questions regarding the use of flatbuffers in python, that focus around how to use them the right way without writing code that utterly defeats its performance advantage. I want to use flatbuffers for serialization and network…
Jim Panse
  • 606
  • 1
  • 4
  • 12
12
votes
1 answer

target_compile_definitions with several flags

I'm trying to change the flatbuffers library CMakeLists.txt to make PUBLIC some flags. Then, I've rewritten these lines: Original code elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") set(CMAKE_CXX_FLAGS…
fenix688
  • 2,435
  • 2
  • 17
  • 23
11
votes
4 answers

FlatBuffers: Write to and read from binary file?

I have basic knowledge of file streams in C++ and Google FlatBuffers. The Schema file is quite simple, also creating a buffer and reading from a buffer pointer. The thing that I don't get is how to save multiple buffers into a binary file, and then…
Davinish
  • 195
  • 1
  • 1
  • 9
9
votes
3 answers

FlatBuffers vs. Protobuf

My question is if FlatBuffers is much faster than Protobuf, why isn't it more widely used compared to Protobuf? It used to be an experimental thing but it seems to be mature enough now but isn't widely used yet. It seems people mostly use…
NEO
  • 2,145
  • 2
  • 26
  • 34
9
votes
1 answer

FlatBuffers: Send Multiple Packet Types Using a Union

I will be sending multiple buffer types over a connection. To keep it simple, imagine a schema like: namespace MyEvents; table EventOne { id:uint; timestamp:ulong; adress:string; } table EventTwo { id:uint; …
GTAE86
  • 1,780
  • 3
  • 29
  • 39
8
votes
2 answers

FlatBuffers: How to write giant files

I'm experimenting with FlatBuffers to store OpenStreetMap data. So, this would be 50GB. Since usually everything is kept in memory, how is it possible (if at all) to sequentially write data into a file? I have a feeling this is not quite where…
benjist
  • 2,740
  • 3
  • 31
  • 58
7
votes
1 answer

importing flatbuffers correctly with typescript

In typescript I am using flatbuffers like this: import {flatbuffers} from 'flatbuffers'; const builder = new flatbuffers.Builder(1); then I compile to js to be use with react-native: const flatbuffers_1 = require("flatbuffers"); const builder = new…
Alvin
  • 8,219
  • 25
  • 96
  • 177
6
votes
2 answers

MIME type for Flatbuffers?

I've searched to find the proper MIME type for flatbuffers but I can't seem to find any. No mention of it on their documentation either. The project page: https://github.com/google/flatbuffers
kewur
  • 421
  • 5
  • 15
6
votes
2 answers

FlatBuffers and NULL value

What is canonical way to store NULL value in FlatBuffers ? I have ExpirationDate *int64 I understand why FlatBuffers is not defining NULL. But I do not understand how to handle that properly. Should I have extra bool field or make value a…
user3130782
  • 841
  • 1
  • 6
  • 15
1
2 3
25 26