Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,766 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forked from google/flatbuffers

Goal

Use "--force-defaults" option to emit default values into final bytes. Table Start function will add all default values into builder.

Supported Languages

  • Java/C#
  • Golang

Example

flatc -g -n packet.fbs --force-defaults

// packet.fbs
namespace packet;

table Packet {
  id:uint16=1234;
}

Packet.go

...
func PacketStart(builder *flatbuffers.Builder) {
	builder.StartObject(1)
	builder.PrependUint16Slot(0, 1234, 0)
}
...

Packet.cs

...
public static void StartPacket(FlatBufferBuilder builder) {
	builder.StartTable(1);
	builder.AddUshort(0, 1234, 0);
  }
...

will be generated.

About

FlatBuffers: Memory Efficient Serialization Library

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages