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

How to build flatbuffers message with existing struct buffer in javascript

I'm sending an ack to a received message in Node.js server and I want to echo the messageId back to the client. Currently I'm parsing the messageId from a buffer to string and building the ack from the string. Parsing the id to string and back is…
Mikko
  • 1,877
  • 1
  • 25
  • 37
0
votes
0 answers

c++ parsing binary message library with bit fields

Hi is there any descent binary parser AND builder library with support of bit fields in schema( I mean fields in the protocol which have arbitrary bit length and not standard int 32 bits or such). Protobuf and Flatbuffers does not seam to support…
Boris
  • 1,311
  • 13
  • 39
0
votes
1 answer

Flatbuffers: can I change int field to struct with 1 int?

Based on a very good approach for null fields proposed by the main contributor to flatbuffers: https://github.com/google/flatbuffers/issues/333#issuecomment-155856289 The easiest way to get a null default for an integer field is to wrap it in a…
Vassil Lunchev
  • 159
  • 1
  • 10
0
votes
1 answer

Correct way to create flatbuffer of 500.000 records

I made some test with 100.000 records and json_encode still faster than making createMyModel(builder,id,.....) of every fetched row . I'm just doing the following: //Flatbuffer Version $query->execute(); $builder = new…
aaron0207
  • 2,293
  • 1
  • 17
  • 24
0
votes
1 answer

Flatbuffers GoLang- Unable to understand my mistake while serializing and deserializing data resulting in not able to retrieve the data

I am new to Flatbuffers and GoLang. I am trying to implement a function that take converts an object to flatbuffer and retrieves the same object. Here is my code. Updated Code func getannouncements(){ annList :=…
tommy
  • 1
  • 2
0
votes
1 answer

Flatbuffers: Assertion `off && off <= GetSize()' failed

Having implemented my "bottom up" flatbuffers encoder I get the following error message: ../../flatbuffers-master/include/flatbuffers/flatbuffers.h:804: flatbuffers::uoffset_t flatbuffers::FlatBufferBuilder::ReferTo(flatbuffers::uoffset_t):…
0
votes
1 answer

flatbuffers: Using add_myTable(table) to encode data

I am trying to use the following method of building a table, as taken from the flatbuffers tutorial: MonsterBuilder monster_builder(builder); monster_builder.add_pos(&pos); monster_builder.add_hp(hp); But having done this for my root table I am…
0
votes
1 answer

Cannot find flatbuffers-1.4.0.jar

A very simple/dumb question as the title suggests. But I've spent hours into this and no luck yet. I searched its official site: https://google.github.io/flatbuffers/, didn't find its jar. I was hoping to find some instructions to download it source…
Fisher Coder
  • 3,278
  • 12
  • 49
  • 84
0
votes
1 answer

dynamic id and special characters for serialization with flat buffers

I have Json data like below { "!type": "alarm", "$": { "12279": { "!type": "alarm", "title": "Default", "$": { "5955": { "!type": "alarm", "name": "Wake", "day": "SUN", …
gyan deep
  • 1,880
  • 1
  • 13
  • 9
0
votes
1 answer

How to properly delete a FlatBuffer object read from disk

I read compressed data from disk, uncompress it, and create a "Cell" object that was generated from a FlatBuffer scheme. Cell* getCell(int x, int y, int z) { // ... return GetCell(buffer); // buffer is an inflated uint_8 data array } So…
benjist
  • 2,740
  • 3
  • 31
  • 58
0
votes
1 answer

Simple FlatBuffer over ZeroMQ C++ example - Copying struct to flatbuffer over zmq and back to a struct again

I've referenced some examples and I'm modeling my system off of the server and client example and I feel like I'm very close. StarBuffer.fbs: table StarBuffer { radius: double; mass: double; volume: double; } root_type…
fIwJlxSzApHEZIl
  • 11,861
  • 6
  • 62
  • 71
0
votes
1 answer

Add existing FlatBuffers object to FlatBufferBuilder C#

I have two tables which both contain an Environment table table Environment { windDirection:int = 0; windMagnitude:int = 0; windVariation:int = 0; rain:ushort = 0; snow:ushort = 0; dust:ushort = 0; fog:ushort = 0; } table…
JohnGalt131
  • 5
  • 1
  • 5
0
votes
3 answers

indexOutOfBoundExeption when reading string from table

I am getting an IndexOutOfBoundsExpetion when reading a string from a flatbuffer for some reason. my schema: namespace com.busalarmclock.flatbuffers; table Message { routes:[Route]; stops:[Stop]; trips:[Trip]; } table Route { …
itayrabin
  • 398
  • 1
  • 2
  • 12
0
votes
1 answer

Flatbuffer buffer is always empty

I have a schema: namespace ExampleApp.Assets.Communications; table FlatServerToClientMessage { messageid:string; imagebytes:[ubyte]; } root_type FlatServerToClientMessage; and for clarity, here is ServerToClientMessage.cs: public class…
pookie
  • 3,796
  • 6
  • 49
  • 105
0
votes
1 answer

Zero Copy byte[] or ByteBuffer with HttpServletResponse

When using Google's FlatBuffer, the type that ends up being used is a ByteBuffer (which can just wrap a byte[]). I am using this with an HttpServletResponse. The problem becomes the Servlets PrintWriter does not offer byte[] or ByteBuffer writing.…
ThePrimeagen
  • 4,462
  • 4
  • 31
  • 44