Skip to content

Why should I use zserio? #442

Answered by fklebert
leland17 asked this question in Q&A
Discussion options

You must be logged in to vote

I agree that the used benchmark example does not really show the difference.
The main difference is the data size of the encoded stream. In contrast to protobuf, zserio offers the ability to define structures on the bit level.
Simple example: You have a field that shall encode an enum with values NORTH, SOUTH, EAST, WEST.
In proto that will end up using minimum 8 bit + wireformat overhead.
In zserio that can be encoded using 2 bits without any wireformat overhead.

So if you have many fields in a structure with smaller values, then zserio outperforms proto by a margin when dealing with big data amounts. Just think of the example above for a data structure that contains such an enum in a li…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by fklebert
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #341 on November 03, 2022 14:24.