Hello, I would like to write the size of the serialized message followed by the message(to stdout) One approach is to write to an array, write the length and then the array
Method 1 v= ByteSize() SerializeWithCachedSizesToArray(uint8* data,) and then write data But this requires I create an array. Method 2 Another approach is to write ByteSize(to stdout) and then call SerializeWithCachedSizes(OstreamOutputStream) directly writing to stdout. Q: Is the second method more efficient? I just need to create messages and throw them out. I don't need the serialized data hanging around. Regards Saptarshi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---