5
Serialization Internals
Now that we know how to describe data in Protobuf text format and encode it into binary, we have all the tools we need to learn about the serialization internals. These internals are important to learn because there are a lot of trade-offs between the different types and we need to be aware of them to define efficient schemas.
In this chapter, we’re going to cover the following main topics:
- Variable-length integers
- ZigZag encoding
- Fixed-size integers
- How to choose between integer types
- Length-delimited encoding
- Packed versus unpacked repeated fields
- Maps
By the end of this chapter, you will know how Protobuf encodes/decodes data to/from binary and you will understand the output binary by yourself.
Technical requirements ...
Get Protocol Buffers Handbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.