Skip to Main Content
Protocol Buffers Handbook
book

Protocol Buffers Handbook

by Clément Jean
April 2024
Intermediate to advanced content levelIntermediate to advanced
226 pages
4h 24m
English
Packt Publishing
Content preview from Protocol Buffers Handbook

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Complete Introduction to Protocol Buffers 3

Complete Introduction to Protocol Buffers 3

Stéphane Maarek
Linux Kernel Programming

Linux Kernel Programming

Kaiwan N. Billimoria

Publisher Resources

ISBN: 9781805124672Supplemental Content