Marc Gravell writes:

> I'm sorry - I didn't do a good job with the question...
> I meant with things like integer, float, etc...
> With the packed encoding, it *seems* like it would be possible to send
> jagged array-like data fairly efficiently.
> I wasn't referring to string/message.

Without loss of generality, assume a field such as this:

  repeated int32 myints = 1 [packed];

If I understand correctly, you are talking about the behavior when
there are several instances of such a field in a buffer -- for
example, myints : { 1, 2, 3 } followed by myints : { 4, 5 }.  The
current behavior is that a program ends up with the same data
structure as if it encountered myints : { 1, 2, 3, 4, 5 }: it gets one
array of int32 elements.

Your suggestion is that a program could instead generate a "jagged"
array-of-arrays from this data.  The first element of the myints field
would contain {1, 2, 3} and the second would contain {4, 5},
reflecting the message's structure "on the wire".  Do I understand

(I can see the benefit of allowing that, but it does significantly
change the semantics of message concatenation, and it adds a new
family of generated data types.)


You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to