so the program should know what's the  type of data,when my wire_type is 
one,I shoud distinsh int32, int64, uint32, uint64, sint32, sint64, bool, 
enum type.

在 2014年12月31日星期三UTC+8上午1时52分28秒,Ilia Mirkin写道:
>
> You can't tell from the binary stream. You have to know what data 
> you're decoding to decide exactly how to interpret the decoded varint 
> value. 
>
> On Tue, Dec 30, 2014 at 3: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? 
> > 
> >    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.

Reply via email to