[protobuf] Extracting just one item of a reapeated collection!

2011-10-06 Thread Michael Bartel
I have a lot of data and need PBF just to extract the things i want from it, and not everything at once. I am getting the impression, that PBF is not suitable for that kind of needs, but I am pretty new to it, and maybe i'm overlooking something. I have for example: message x { repeated Y y

Re: [protobuf] Extracting just one item of a reapeated collection!

2011-10-06 Thread Jason Hsueh
You could write our own decoder around CodedInputStream, manually reading and skipping the messages that you don't care about. The other option is to use an equivalent message definition message XAsBytes { repeated bytes y = 1; } And then manually decode the entry you want into Y. On Thu, Oct