Protobuf Wire Types
Every field in a Protobuf message starts with a tag encoding both the field number and wire type. The tag = (field_number << 3) | wire_type. There are 4 active wire types: 0, 1, 2, and 5.
tag = (field_number << 3) | wire_type
Example: field 1, wire type 0 → (1 << 3) | 0 = 0x08
Example: field 2, wire type 2 → (2 << 3) | 2 = 0x12