[protobuf] Best way to deserialize

2011-04-11 Thread yaroslav chinskiy
Hi, I will have heterogeneous set of protocol buffers. I will not know the types and the number until the runtime. I am planing to create a factory which will convert byte[] to protocol buffer object. What is the best practice? How can I figure out the protocol buffer out of the byte array?

Re: [protobuf] Best way to deserialize

2011-04-11 Thread Christopher Smith
Best thing is when encoding, group messages by type and preface each group with a type name and FileDescriptorSet which will allow you to decode the rest using a DynamicMessage (see notes on self describing messages on the wiki). As per usual, use coded stream encoding with length prefixing for