A schema is a contract. The wire format is how data that honors it actually gets from one program to another. This chapter is about the raw bytes, the physical layer everything else in the spec sits on top of.
A serialized Protobuf message is a flat stream of tag/value pairs, nothing else. Each tag names a field by number and says what its wire type is. The wire type tells the decoder how many bytes the value takes up. There is no header. There is no field count. There is no schema anywhere in the payload. The decoder just reads fields one after another until the bytes run out.
Most of the format's compactness comes from a single primitive. A varint spends bytes in proportion to a number's actual size, not its declared width. Tags, lengths, and most integer values are all varints, and ZigZag stretches the same trick to cover negative numbers too.
The pages in this chapter build that picture one layer at a time. The Binary Explorer lets you check any of it against real bytes. Edit a schema and a message, and it shows you the annotated encoding, byte by byte.
This guide should help explain how the Protobuf encoding works, but if you have questions about edge cases or specifics that we don't cover, refer to the official encoding guide.
Next
Binary 101
Bits, bytes, endianness, and the bit shifting the rest of the wire format builds on.