Oh, I see. No, CodedOutputStream doesn't support seek functionality, so I
guess you'd have to go with b). Just make sure that you're using
WriteLittleEndian64 and not WriteVarint64.
On Sat, Nov 14, 2009 at 12:05 PM, Fishtank saptarshi.g...@gmail.com wrote:
That's because I don't know the size
Why can't you write the actual size of data rather than a 0? Just use the
ByteSize() method to find out how much data will be written for a protocol
buffer.
On Sat, Nov 14, 2009 at 11:39 AM, Fishtank saptarshi.g...@gmail.com wrote:
Hello,
I'm using the following idiom
ZeroCopyOutputStream*
That's because I don't know the size of data1(and it is not from
protobuf parse)
I'm using protobuf for the stream libraries.
I can either a) loop through the calculation to get the total data
size, then loop again writing size and data
or b) loop once, write, get size, seek and adjust size.