DeWitt Clinton writes:

> I've also used the pattern:
>   message Map {
>     message Entry {
>        optional string name = 1;
>        optional string value = 2;
>     }
>     repeated Entry entries = 1;
>   }
> Alkis, do you see benefits or downsides between the two approaches?

With a message for each pair, you spend a few extra bytes to identify
each embedded message (namely, the message tag and length), but you
don't have to worry about keeping two arrays synchronized with each

My personal inclination would be for the embedded message unless the
dictionary has extremely many elements -- but if it were that large, I
would probably not pass the whole thing in one chunk anyway.

Michael Poole

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