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

Flatbuffer gRPC streaming definitions (bidi, server, client...)

I'm trying to implement a Flatbuffer gRPC server and was original confused by the streaming: "server" definition. After much digging and frustration because of the lack of documentation on the topic I did manage to figure out that there are a few…
ddibiase
  • 1,412
  • 1
  • 20
  • 44
2
votes
1 answer

Flatbuffer wire size larger than expected

I am testing a flatbuffers serialization implementation, but I am seeing a much larger ratio of serialized data size to raw data size. I realize that the protocol is designed to allow backward compatibility and there are alignment considerations…
jaws20
  • 23
  • 2
2
votes
1 answer

C#/Flatbuffers - How to make a ByteBuffer into byte[] and prefix it with ushort

So basically here is how I do it with C++: enum ServerOpcode : uint16_t{ SERVER_AUTH_CONNECTION_RESPONSE = 0x001, SERVER_LOGIN_REQUEST_RESPONSE = 0x002, SERVER_NUM_MSG_TYPES …
Venelin
  • 2,905
  • 7
  • 53
  • 117
2
votes
1 answer

error flatbuffers create a vector of struct

... this is my sample code: struct QfeelSLAMNode { int mnNodeID; float mX,mY,mTheta; bool mbIsLandmark; }; std::vectorm_nodes; std::vector f_node; for (auto it = m_nodes.cbegin();it !=…
lai
  • 21
  • 1
2
votes
1 answer

Understanding of SparsityParameters in tensorflow lite schema

I'm trying to understand the sparse tensor with tensorflow lite schema, which is very hard to do for me though. Luckily, there is only one json example that be made from this schema(tensorflow/lite/testdata/sparse_tensor.json). "sparsity": { …
2
votes
0 answers

Efficiently accessing and iterating over non-primitive arrays with flatbuffers?

I'm working on transmitting point cloud data over the network using Flatbuffers to an application built in Unity. Say I have the following schema file: namespace PCFrame; struct Vec3 { x: float; y: float; z: float; } struct RGB { …
Handelo
  • 39
  • 4
2
votes
4 answers

Is there a portable Binary-serialisation schema in FlatBuffers/Protobuf that supports arbitrary 24bit signed integer definitions?

We are sending data over UART Serial at a high data rate so data size is important. The most optimal format is Int24 for our data which may be simplified as a C bit-field struct (GCC compiler) under C/C++ to be perfectly optimal: #pragma pack(push,…
Crog
  • 1,112
  • 8
  • 16
2
votes
2 answers

Send/Write an array of Float32 using flatbuffers faster

I am using flatbuffers in Go to send an of 10000 array of floats over TCP between two ports on my local machine. I am sending the same message in a loop that only does that. Rate I achieve is only approximately 2ms per message but in C++ I achieve…
snow_abstraction
  • 408
  • 6
  • 13
2
votes
2 answers

Flatbuffer: Compatibility of runtime and compiler

Are Flatbuffers compatible across different versions of the Flatbuffer compiler + runtime libraries? I've spent a many hours troubleshooting this and think I've identified that the answer is "NO", but still haven't found an authoritative answer. The…
Jmoney38
  • 3,096
  • 2
  • 25
  • 26
2
votes
1 answer

Google Flatbuffer iOS

Currently, I got a task to explore google flatbuffers on iOS and OSX. I explored the documentation provided by Google. Also found some libraries on Github on swift language like FlatBuffersSwift and others that implement the flatbuffers. So, I have…
2
votes
0 answers

passing flatbuffers from C to duktape javascript

Wondering if anyone out there has had any success or attempted to integrate flatbuffers with duktape, so far I can only get about 1/2 way there... I can push a flatbuffer from C, and access it from JS with the following code, and it seems to work…
2
votes
2 answers

Multi-language integration problem with FlatBuffers

Question I have a recurring crash (panic: runtime error: slice bounds out of range) from the flatbuffers generated server files when attempting to access a part of a buffer (created with flatbuffers) which contains a message streamed from one client…
2
votes
1 answer

Flatbuffers on the wire

I have a messaging system over which I'm sending a set of different flatbuffer tables. The receiver end needs to be able to pick these off the wire and decode/typecast them to the appropriate type. I can easily send a single type of message and read…
Kenter
  • 47
  • 1
  • 7
2
votes
1 answer

How could I get offset of a field in flatbuffers binary file?

I am using a library, and the library requires me to provide the offset of the desired data in the file, so it can use mmap to read the data (I can't edit the code of this library but only provide the offset). So I want to use flatbuffers to…
daquexian
  • 169
  • 3
  • 17
2
votes
2 answers

Getting the sizeOf(a flatbuffers Table)

I am using Flatbuffers with C++. I would like to create an array of bytes in a struct that is the size of the generated table (I am sending the contents as a payload for a NanoMSG message). How does one do a sizeof(table)? #include…
Dr.YSG
  • 7,171
  • 22
  • 81
  • 139