On Thursday, June 11, 2015 at 6:08:33 PM UTC-7, caramba230 wrote:
>
> Hi,
> I have a question about assigning tags, the documentation says :
> "tags with values in the range 1 through 15 take one byte to encode, 
> including the identifying number and the field's type (you can find out 
> more about this in Protocol Buffer Encoding 
> <https://developers.google.com/protocol-buffers/docs/encoding.html#structure>).
>  
> Tags in the range 16 through 2047 take two bytes. So you should reserve the 
> tags 1 through 15 for very frequently occurring message elements."
> But if I have a message A with two fields, and his first field is another 
> message who has 15 fields, and the second one has 12 fields. Which fields 
> will be encoded with one byte?
>
The documentation is talking about the number of bytes needed to encode the 
tag, not the actual content of the field. Whether the field is a message 
field or a string field or a int32 field, doesn't matter.
 

> Thanks
>

-- 
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to