2010/7/21 Julian González <julian....@gmail.com>:
> Does protocol buffers support an scalar type of one byte or two byte
> length? lets say an int16, int8?

No. But note that integers are 'varint' encoded, so if you only give a
small value, it will only eat up a small amount of bits.
So a number in the range of 0..127 will actually be encoded as only
one byte etc.
Note that for instance int32 and int64 are actually encoded the same
on the wire for the same reason. This allows as well to do a backward
compatible change from int32 to int64 for a protocol field.

Details on the encoding:
http://code.google.com/apis/protocolbuffers/docs/encoding.html#varints

-h

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@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