Re: [protobuf] Variable-Width Integer Encoding

2018-01-03 Thread Ilia Mirkin
I doubt you're going to get a nice clean answer. Chances are it's "whatever Sanjay was thinking at the time" which led to the current encoding, maintained throughout the proto versions for backwards compatibility with existing data. While APIs have changed over time, the wire encoding has remained

[protobuf] Variable-Width Integer Encoding

2018-01-02 Thread matthew . marting . 1
What is the rationale behind the current variable-width integer encoding? As I understand it, an integer is terminated by a byte that's most-significant bit is equal to zero. Thus, bytes must be read one at a time, and this condition must be checked after reading each one to determine whether