The value returned by Message::ByteSize() does not match the actually number of bytes that are consumed after writing a message to a stream. Example:
some_message m; /* ... populate m ... */ size_t len = m.ByteSize(); int pos = boost::iostreams::position_to_offset(stream.tellp()); /* save the current position of the stream */ m.SerializeToOstream(&stream); /* and now this assert will fail */ assert(pos + len == boost::iostreams::position_to_offset (stream.tellp()); Maybe I'm missing something here, but shouldn't the value returned by ByteSize() be the same as the actual number of bytes written to the stream? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---