Thank You For Your Reply! they are both encoded by varints,ZigZag is more efficient,why it's more efficient?
在 2014年12月31日星期三UTC+8上午1时52分10秒,Feng Xiao写道: > > > > On Tue, Dec 30, 2014 at 12:47 AM, Lai Champion <[email protected] > <javascript:>> wrote: > >> >> I read the protocol buffer documents,I know compiler use ZigZag to >> decode signed interger. I am confused that if i receive a binary stream,I >> could extract the data type ,for example,it's a Varint Wire-Type,followed >> by the data number for example 96 01, so how to decide the number is a >> signed or an unsigned? >> > It's not possible. Both signed and unsigned integers are serialized as > varints. > > >> >> can anyone help me clarify the problem? >> >> Best Regards! >> >> -- >> 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 [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/protobuf. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
