[protobuf] Re: Zig Zag Encoding (vs two's complement encoding)

2011-01-19 Thread David Srbecky
. On Fri, Jan 14, 2011 at 12:07 AM, David Srbecky dsrbe...@gmail.com wrote: 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

Re: [protobuf] Zig Zag Encoding (vs two's complement encoding)

2011-01-14 Thread David Srbecky
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

[protobuf] Re: Zig Zag Encoding

2011-01-14 Thread David Srbecky
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

[protobuf] Zig Zag Encoding

2011-01-13 Thread David Srbecky
the design. Regards, David Srbecky -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more