Comment #4 on issue 469 by [email protected]: how to write/read more than one piece of message to/from a text file in c++
http://code.google.com/p/protobuf/issues/detail?id=469

Yes,it is just binary data chunk. When I open the file stored some protobuf messages, it seems like that the SerializeToString method forms a c++ string with a "\n" as the last character. And when debugging, the first character of the serielized string is '\n' whose ASCII code is 0x0A. if you try parse it in this way,it will work: head a character '\n' at the buffer that receive the parse binary data chunk gotten from readline. At most of the time, it will work, yet there is a problem: when it failed to parse, you can do nothing, readint its source code, it's a lot of work. And I have come across this problem. In other words, the parsing method by heading a character '\n' is unreliable or unstable.

Any one have other Feasible way to read/write messages from/to a file? Thanks.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
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 [email protected].
To post to this group, send email to [email protected].
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