Frankly, negative numbers shouldn't be encoded as varints at all.  It's only
for historical reasons that we do it.
If the last byte were 0x7f, that only gets you to 70 bits, so I'm not sure
how you could go from there to arbitrarily large numbers.

On Mon, Aug 10, 2009 at 10:05 AM, rog <rogpe...@gmail.com> wrote:

>
> when serialising a negative number as a varint,
> the last byte is encoded as 0x1, not 0x7f.
>
> might it not be better if it was encoded as the
> latter, to allow potential future extensions,
> such as 128-bit, or arbitrarily large, integers,
> without compromising old code?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to