Hi,
> As you can see, *all *the numbers are encoded in a single callback.
> I tried to achieve the same when decoding, but I can only decode single
> number per callback.
Yes, this is normal.
Protocol buffers format allows the fields to arrive in any order, so
there can be other data between repeated fields. Of course this is
usually not the case, but is allowed by the specs.
If the field is packed, then you can read multiple values in decoding
callback. This is a good thing from efficiency standpoint, but your
callback must still be able to handle separated data.
(You can also modify your encoding callback to write data in packed
format. Look at
https://code.google.com/p/nanopb/source/browse/pb_encode.c#124 for an
example.)
--
Petteri