Hi,
I have a question here,
I want use int16 (short) to verify a variable,because int32 is too big for me , I want to reduce the length of my package.
Is there any way to do this?
Thank you !
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Protobuf has a fee encodings for integer data, which basically come down to:
- varint (with or without zigzag)
- fixed-32 (always 4 bytes)
- fixed-64 (always 8 bytes)For 16 bits, you will do best with varint. If the data can be negative (signed), ensure you are using the zigzag form (sint32). But that is all the options.
Marc
On 7 May 2013 18:36, "王海龙" <hailong...@gmail.com> wrote:
Hi,
I have a question here,
I want use int16 (short) to verify a variable,because int32 is too big for me , I want to reduce the length of my package.