Hi,
> Petteri, Thanks for your quick reply. I was surprised to see that the
> decode callback doesn't get any explicit notification of the number of
> strings that will come from the stream. I guess I will have to add
> that to the message explicitly.
The protobuf format doesn't give the number of fields separately. Of
course if you have the whole message in a memory buffer, it is easy to
count them, but if you are reading from stream it is not possible.
Also field order in protobuf is unspecified, so it may be quite
troublesome to ensure that you receive the "number of strings" field
before the actual strings.
What are you going to do with the strings? And where is the message
coming from?
> Do you also have an example of repeated bytes?
It is exactly same as strings. The encoded data is exactly the same
with bytes and strings fields, difference is only in datatypes in
structures when not using callbacks.
--
Petteri