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
2
votes
2 answers

Any way to determine what kind of schema was received

I have the following two schemas. I send data over a socket; on receiving is there any way to determine which one was sent? namespace Objects; table Login { email:string; password:string; } root_type Login; …
Lundira
  • 169
  • 3
  • 12
2
votes
2 answers

FlatBuffers C++ Minimum Version

The FlatBuffers project requires a C++11 compiler to build. But what are the version requirements for the C++ header file generated by flatc?
masonk
  • 9,176
  • 2
  • 47
  • 58
1
vote
2 answers

Revisit of Flatbuffers vs. Protocol Buffers

Since this article (written by Kenton Varda in 2014), has anything changed about the use cases of using FlatBuffers vs. Protobuf? Alternatively, has something else come along that is now the preferred format/library for data…
GentlemanS
  • 31
  • 3
1
vote
0 answers

Best method for accessing an object in a flatbuffer builder before it is finished?

I am building a node in flatbuffers that contain different object types and a signature of that object. ------------------ | Node | | object_sig | | -------- | | | Object | | | -------- | …
douggard
  • 692
  • 1
  • 12
  • 29
1
vote
1 answer

Flatbuffers VerifySizePrefixedBuffer from stream

This question is about the correct pattern for reading size prefixed Flatbuffers from a stream in C++. Consider a data stream - ie. TCP where messages are are delimited by their size prefix. I was initially under the impression that these could be…
tchatow
  • 748
  • 1
  • 7
  • 16
1
vote
1 answer

Serializing a Nested Struct to send/recv in MPI

Basically I'm creating a parallel program to calculate a julia set image of +50000 by 50000 pixels and I'm using MPI and PNG lib to do so. I have a struct of typedef struct Block { int size; int place; png_bytep *rows; } block; block…
Max Rush
  • 41
  • 4
1
vote
2 answers

file generated by add_custom_command cannot be found within add_subdirectory

I'm in the process of generating an api using flatbuffers within cmake. Now when on top level of the cmake directory tree the api is generated, the include files that should be generated are not found when they are needed in the…
1
vote
0 answers

Is there a way to know the current flatbuffer builder buffer size?

I'm currently working in high performance computing and the protocol we choose to connect the backend applications is flatbuffers because binary and zero-copy... In one end, an app is going to send large amounts of data in "client streaming" form,…
GChiappe
  • 71
  • 5
1
vote
0 answers

Different size of the same instance of flatbuffers structure of primitives

Consider the following flatbuffers scheme namespace app; table App { value: ubyte; } root_type App; When I try to instantiate the structure with value = 0, and then get the size of the buffer, it gives 12 bytes, but when I instantiate it with…
arsdever
  • 1,111
  • 1
  • 11
  • 32
1
vote
0 answers

FlatBuffer vs Protobuf serialization performance

After migrating existing code from Protobuf (specifically: Protobuf LITE) to FlatBuffers I'm now at the situation where assessing the performance of both is important (before hopefully retiring Protobuf)...but with results not in the way I…
1
vote
1 answer

With FlatBuffer full reflection get the underlying vector type?

Using the FlatBuffer full reflection Relevant code const reflection::Schema& schema = *reflection::GetSchema( binary_fbs_file.c_str() ); auto root_table = schema.root_table(); auto fields = root_table->fields(); for (size_t = 0; i <…
Steven
  • 5,134
  • 2
  • 27
  • 38
1
vote
2 answers

How to create a many to many relation in Objectbox in fbs file

This is my database.fsb file table Author { /// objectbox:id id:ulong; text:string; } table Book{ /// objectbox:id id: ulong; name: string; /// objectbox:relation(name=authors,to=Author) authors:ulong; } What type…
1
vote
1 answer

How exactly do references in flatbuffers work?

According to the "Writing a schema" guide for Google FlatBuffers it is possible to share data using references: "Remember that you can share data (refer to the same string/table within a buffer), so factoring out repeating data into its own data…
San
  • 25
  • 3
1
vote
1 answer

Unable to build flatc compiler flatbuffer v1.3.0

We are using flatbuffer v1.3.0 and seeing error building flatc compiler. Same error for flatbuffer version v1.3.0 to v1.12.1 Build is successful for version 2.0.0 Should we use a particular version of make to build the flatc compiler? If so how to…