Home

Awesome

Feature

FeatureFlatBuffersProtobufMolecule
SchemaYesYesYes
Zero copyYesNoYes
Random access*YesNoYes
VerifierOptYesOpt
Byte consistency*NoNoYes

Random access: You can read just one field of a message without parsing the whole thing.

Byte consistency: The same data can be represented in multiple different byte sequences or not, although usually FlatBuffers or Protobuf serializer will produce the same output from the same data, it is not a formal guarantee, so you can't just glance at two outputs (or their hashes) and conclude "if the bytes are the same the data is the same, otherwise the data is different".

Benchmark

Serialize Header

serialize_header

Serialize Block

serialize_block

Deserialize Header

deserialize_header

Deserialize Block

deserialize_block

Data Size

FlatBuffersProtobufMolecule
Header352253304
Block268016247356267120