[protobuf] Partially serialize and deserialize protocol buffers

2014-12-29 Thread Li Yan
Hey guys, I read document https://developers.google.com/protocol-buffers/docs/encoding and basically understand how protocol buffers are encoded and decoded. I would like to know whether there exists APIs to partially serialize and deserialize protocol buffers. For example, I add serialized fie

[protobuf] Partially serialize/deserialize protocol buffers

2014-12-29 Thread Li Yan
Hey guys, >From https://developers.google.com/protocol-buffers/docs/encoding, I basically understand how to encode protocol buffers: the keys and values are concatenated into a byte stream. My question is whether there exists API to partially serialize/deserialize protocol buffers? I mean add

Re: [protobuf] Partially serialize/deserialize protocol buffers

2015-01-03 Thread Li Yan
Yes. You are right. CodedInputStream is a possible solution. This is helpful. I also find out that the generated Java protocol buffers code also uses it to decode. Thanks, Li On Tuesday, December 30, 2014 10:09:08 AM UTC-8, Henner Zeller wrote: > > On 29 December 2014 at 10:53,