Okay, I spoke too soon on the first bug.
 From http://code.google.com/apis/protocolbuffers/docs/encoding.html : 
"If you use int32 or int64 as the type for a negative number, the 
resulting varint is always ten bytes long – it is, effectively, treated 
like a very large unsigned integer."

So it is clear that protoc is always casting 32 bit values to 64 bit 
values before sending them onto the wire and this is documented.  I 
apologize for not double checking this before posting my previous message.

My decoder handles this by discarding the excess high bits, so my reader 
code is fine.

My writer will need to be changed to match the documentation, since it 
only writes five bytes for negative 32-bit values.


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 [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to