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

How to build flatbuffers on OSX?

I'm trying to build flatbuffers on OSX but I'm not sure how to proceed exactly. According to the doc. I should run cmake -G "Xcode". I did that and got the result: -- The C compiler identification is Clang 5.1.0 -- The CXX compiler identification is…
laurent
  • 88,262
  • 77
  • 290
  • 428
5
votes
0 answers

Buffer deduplication procedure will be skipped when flatbuffer library is not properly loaded. (Tensorflow Lite)

Every time I convert a model to a tflite format, I always receive this WARNING. I wonder if this library will further reduce the model size. If so, I hope to use it. But I can't find relevant information in Google, and flatbuffer's documentation…
fjybiocs
  • 59
  • 5
5
votes
2 answers

Protocol Buffers vs Flat Buffers

So, I'm currently working on a project where Protocol Buffers is used extensively, mainly as a way to store complex objects in a key-value database. Would a migration to Flat Buffers provide a considerable benefit in terms of performance? More in…
Matteo Ugolotti
  • 367
  • 3
  • 12
5
votes
1 answer

Multiple root tables in flatbuffers

I'm checking out Flatbuffers for implementing a communication protocol. When a message is received, it may in my case contain a number of different tables. If I understand correctly, the way to achieve this in Flatbuffers is to use a "root" table…
villintehaspam
  • 8,540
  • 6
  • 45
  • 76
5
votes
1 answer

deserialise google flat buffers

I have a nodejs application that uses google flat buffers. the fbs file for the drinks schema: namespace MyAlcoholist; table Drink { drink_type_name: string; drink_company_name: string; drink_brand_name: string; drink_flavor_type_name :…
ufk
  • 30,912
  • 70
  • 235
  • 386
5
votes
1 answer

Does FlatBuffers avoid strict aliasing somehow?

I have been looking at the FlatBuffers library recently. I was looking to evaluate it for use in my project. Upon looking at flatbuffers.h, I am wondering if there is a violation of the strict-aliasing rule and if it does account for strict…
Chap
  • 2,776
  • 24
  • 31
4
votes
1 answer

Why does FlatBufferBuilder have a lifetime?

Why does FlatBufferBuilder from the Rust flatbuffer library have a lifetime associated with it? The lifetime makes it difficult to use in structs, as I then need to add a lifetime to them. I see that the lifetime is used for a few methods, but it…
cberner
  • 3,000
  • 3
  • 22
  • 34
4
votes
1 answer

Deserialize flatbuffers binary that represents non-root table

Is it possible to deserialize a binary flatbuffers object that represents a non-root table? Suppose the following flatbuffers schema: table Foo { ... } table Bar { value:[Foo]; } root_type Bar; Suppose we have access to the binary data that…
Pejman
  • 1,328
  • 1
  • 18
  • 26
4
votes
1 answer

convert json schema to flatbuffer schema

Is there is a way to convert the JSON schema to Flatbuffer schema? The use case here is user can create the JSON schema but I am finding a way to convert the JSON schema to Flatbuffer. Example:Input { "$schema":…
Syed Abdul Kather
  • 608
  • 2
  • 12
  • 29
4
votes
2 answers

Fast Python Serialize to Flatbuffer?

While exploring the flatbuffer library for fast serialization, I noticed that the library had an incredibly fast way to read flatbuffer vectors into numpy arrays with the 'Variable'AsNumpy() command, but I have been unable to find (in source) a…
user1519665
  • 511
  • 5
  • 16
4
votes
1 answer

FlatBuffers: Encoding in C++ versus C#, decoding in C# end-to-end example

Imagine a schema: namespace MyEvents; table EventAddress { id:uint; timestamp:ulong; adress:string; } table EventSignalStrength { id:uint; timestamp:ulong; strength:float; } table EventStatus { …
GTAE86
  • 1,780
  • 3
  • 29
  • 39
4
votes
2 answers

Writing a vector of struct with flatbuffers

I have the following classes: namespace Message; struct BBox { xmin:float; xmax:float; ymin:float; ymax:float; } table msg { key:string; boxes: [BBox]; } root_type Message; To create the object I do something such as b =…
Alexis
  • 2,149
  • 2
  • 25
  • 39
4
votes
2 answers

Can FlatBuffers be used with PHP server side?

I'm writing applications for Android and iOS, until now we were using JSON to pass data between the server and the client apps. Our server is written in PHP. Now I was thinking to move our implementation to FlatBuffers instead of JSON. Does someone…
Emil Adz
  • 40,709
  • 36
  • 140
  • 187
3
votes
1 answer

Why flatbuffer struct fields can not be vector/table/string?

Structs may only contain scalars or other structs. But as I konw , only offset is writed to buffer when writing vector/table/string field into table data (the data of vector/table/string is wirited before table data). So struct contains…
xiemeilong
  • 643
  • 1
  • 6
  • 21
3
votes
0 answers

FlatBuffers - When --grpc is used error No template named 'StreamedUnaryHandler' in namespace 'grpc::internal'

I am using FlatBuffers and here is my schema: namespace Vibranium; table AccountRole_Packet { id:int; name:string; } table AccountRole_Packet_Response { id:int; name:string; } root_type AccountRole_Packet; rpc_service…
Venelin
  • 2,905
  • 7
  • 53
  • 117
1
2
3
25 26