That makes perfect sense. Thank you for your answer.
David
On Jan 19, 4:37 am, Kenton Varda ken...@google.com wrote:
The reason ZigZag encoding evolved as it did is because it can be applied as
a separate layer on top of varint encoding. Originally, ZigZag was not
officially part of the
126 is 0111 1110 in binary. We truncate it form the left to
groups of seven: 000 110 and then encode it as usual (least
significant group first): 1 110 0 000. It takes two bytes to
encode, but so does the zig-zag encoding.
In fact, the zig-zag encoding and the two's