Can't you use ByteSize() method to get the size?

Oliver

On Sunday, April 21, 2013 12:07:57 AM UTC-4, Sean Nguyen wrote:
>
> Hi,
>
> I want to calculate the protocol buffer message size without reading the 
> stream to the end? I don't see the size of the outer most message is 
> stored. For example:
>
> message Person {
>    optional string name = 1; 
>    optional uint32 age = 2; 
> }
>
> There is no size store for the Person message if it is the outer most 
> message. Is that correct? If it is not where I can find it?
>
> Thanks,
>
> Son Nguyen
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to