> > a) both variants are correct (so, ProtoBuf.jl shall be corrected)
> > Is there any recommendation on how these repeated arrays shall be encoded?
> > I tried to find the information at Google ProtoBuf website, but I have
> > found only a very basic examples, not covering this in particular.
> Repeated fields can be encoded in two forms: the regular form and the
> packed form:
> Both are valid and a parser is expected to be able to parse both.
And as for why nanopb is the only one encoding it differently, it is
because I always encode as packed. (Listed under limitations here
This design choice was made because parsers should be able to decode
both types, and packed format is more efficient for arrays longer than
1. So from code size point of view it didn't make sense to implement
It may be that ProtoBuf.jl has just overlooked this point that decoders
should accept both formats. As a workaround, one can try adding
[packed=true] to .proto.
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.