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
1 answer

How to store dictionaries(map) in flatbuffer in Java

I was learning flatbuffers from this link , there was no example to demonstrate how to store dictionary(map). There was a mention of "Storing dictionaries in java/Csharp" in this link , but i did not understand much about it. I am from java…
stallion
  • 1,901
  • 9
  • 33
  • 52
2
votes
1 answer

CMake declare dependency of function on ExternalProject_Add

TLDR: My problem is that CMake starts executing this function before downloading the repository. I would like to declare a dependency for that function on ExternalProject_Add so that CMake understands that it should download, build and then…
Pejman
  • 1,328
  • 1
  • 18
  • 26
2
votes
1 answer

Mutating array of tables when using (not object) C++ API without recreating entire flatbuffers

Is it possible to mutate array of tables when using C++ (not object) API without recreating entire flatbuffer? Here is an example of my schema table Document { root_layer:Layer; bitmaps:[Bitmap]; subdocuments:[Document]; } table Layer { …
Sash Zats
  • 5,376
  • 2
  • 28
  • 42
2
votes
2 answers

Load Binary file in Angular 5

I am working in Angular 5 to integrate flatbuffers response with my API call. I am trying to load binary file using HttpClient in Angular 5. I have tried below code to get byte data in Uint8Array. Also tried with Blob but its not working. let apiUrl…
Nishant Shah
  • 3,442
  • 5
  • 25
  • 34
2
votes
1 answer

what's the usage of 'hash' marked in flatbuffers schema field ?

I'm using flatbuffers, in its' schema, some field can set as hash. Eg: table Person { age: int (hash:"fnv1_32" ); } what is this for ? I'm using flatc --cpp --gen-object-api Person_KeyHashTest.fbs How to set 'rehash' and 'resolver' in the…
NeoLiu
  • 212
  • 3
  • 11
2
votes
1 answer

Optimize emulated flatbuffer dictionary

My flatbuffers schema file dict.fbs looks like this: namespace fbs; table Dict { entries:[DictEntry]; } table DictEntry { key:string (key); value:string; } root_type Dict; Now according to the documentation you can emulate a…
user187676
2
votes
1 answer

Flatbuffers flatc schema compiler not generating file

I'm trying to run flatc -s test.idl without success. This used to work but after changing laptops I'm not able to compile the schemas anymore. If I intentionally break the test.idl, I get errors, but with correct syntax it just fails…
Mikko
  • 1,877
  • 1
  • 25
  • 37
2
votes
2 answers

Serialize into native memory buffer from C# using flatbuffers

Is it possible with flatbuffers in C# to serialize objects to native (unmanaged) memory buffer? So I want to do these steps: Allocate a native memory buffer from native memory Create objects in C# and serialize them into the allocated buffer Send…
Max
  • 19,654
  • 13
  • 84
  • 122
2
votes
1 answer

Flatbuffers Schema: Vectors of unions

I got this error while trying vectors of unions error: Vectors of unions are not yet supported in all the specified programming languages. Clearly flatbuffers doesn't support vectors of unions. So i need another data type to solve my problem.…
billyzaelani
  • 567
  • 1
  • 5
  • 18
2
votes
1 answer

Flatbuffers: how do you build nested tables?

I have a 3-level nested Java POJO that looks like this in the schema file: struct FPathSegment { originIata:ushort; destinationIata:ushort; } table FPathConnection { segments:[FPathSegment]; } table FPath { …
Jacek Furmankiewicz
  • 1,143
  • 1
  • 13
  • 22
2
votes
1 answer

XSLT Transformation for XSD to FBS (Flatbuffers)

I have many XML-schematas written in xsd to define the structure of xml documents. Now I want to substitute the format with flatbuffers. When looking at the fbs format it looks possible to convert the XSD Schema definition automatically into a FBS…
schoetbi
  • 12,009
  • 10
  • 54
  • 72
2
votes
1 answer

Efficiently clearing flatbuffer builders for layers of tables

Can I reuse 'sub' builder instances generated from a flatbuffers::FlatBufferBuilder after calling builder.Clear()? What is the effect of builder.Clear() on sub-builders? Having generated a flatbuffers schema such as the following: table…
2
votes
1 answer

Flatbuffers verifier behaviour

Is there any way to verify bytearray with flatbuffer structure in it with flatbuffer verifier if tables in schema for that two object starts from similar data types? Example schema: table AddTaskResponse{ blablabla:int; foobar:int; } table…
tty6
  • 1,203
  • 11
  • 30
2
votes
2 answers

Any way to improve flatbuffer performance in debug (c++ MSVC)

I am experimenting with the usage of flatbuffers in my company as a replacement for raw structs. The classes we need to serialize are fairly large and I have noticed that the overhead of flatbuffer serialization is more than we can take when running…
Bouke
  • 104
  • 8
2
votes
1 answer

Reading Flatbuffers objects sent via ZMQ in C++ throws unhandled exception

I am trying to send a reasonably big Flatbuffers object over the network via ZMQ and then read it using C++. When accessing the object, I get unhandled exceptions that I don't know how to solve. Even this minimal example fails: The flatbuffers…
FvD
  • 1,286
  • 13
  • 25