Re: [protobuf] How to Assign encoding number to the field inside message

2020-06-30 Thread Marc Gravell
See https://developers.google.com/protocol-buffers/docs/overview#assigning_field_numbers Basically: - positive integers - unique within each message (can reuse between different messages) - lower is cheaper - avoid some reserved ranges On Tue, 30 Jun 2020, 20:12 rohit nv, wrote: > > I am new t

[protobuf] How to Assign encoding number to the field inside message

2020-06-30 Thread rohit nv
I am new to the gRPC and Protobuf. Wanted to know the significance of encoding number infront of field. In tutorial I saw about the usage of no between 1-15 for frequently used fields as it require 1 byte of encoding and 16 to remaining carries 2 bytes of encoding. May I know when to to use wha