Re: Peek into a serialized message

2008-12-15 Thread sorent
Thank you ! That solves my problem. /Sören --~--~-~--~~~---~--~~ 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, sen

Re: Peek into a serialized message

2008-12-12 Thread Kenton Varda
On Fri, Dec 12, 2008 at 1:20 AM, sorent wrote: > > > Sorry, there's not a reliable way to do this unless you depend the > encoder > > writing the tags in order, which is not guaranteed. > > Just to make sure I get this right ... (refering to the "Union Types" > example) if > I encode a buffer incl

Re: Peek into a serialized message

2008-12-12 Thread sorent
> Sorry, there's not a reliable way to do this unless you depend the encoder > writing the tags in order, which is not guaranteed. Just to make sure I get this right ... (refering to the "Union Types" example) if I encode a buffer including both Bar and Baz then the order is not guaranteed ... it

Re: Peek into a serialized message

2008-12-11 Thread Kenton Varda
Sorry, there's not a reliable way to do this unless you depend the encoder writing the tags in order, which is not guaranteed. One thing you could do is instead of placing an enum field inside your message to identify the type, stick a one-byte tag on the front of the message instead. You will hav