- Note that field numbers in the range 1 through 15 take one byte to encode, including the field number and the field's type (you can find out more about this in Protocol Buffer Encoding). Field numbers in the range 16 through 2047 take two bytes. So you should reserve the numbers 1 through 15 for very frequently occurring message elements. Remember to leave some room for frequently occurring elements that might be added in the future.
- Enumerator constants must be in the range of a 32-bit integer. Since
enum
values use varint encodingon the wire, negative values are inefficient and thus not recommended.
- Map
- the
key_type
can be any integral or string type (so, any scalar type except for floating point types andbytes
). Note that enum is not a validkey_type
. Thevalue_type
can be any type except another map.
- the