1

I am attempting to write a series of messages delimited using this function in google::protobuf::util to a coded stream pointed to a file on my local filesystem. It appears that the call to message.SerializeWithCachedSizes() is failing after successfully writing exactly 8192 bytes of delimited messages to the stream.

My use case is almost identical to this user who asked a question about how to write messages to a file.

The protocol buffer documentation does not say anything about special handling of writing data to a coded stream beyond 8192 bytes as far as I could see, so I would assume this should just work. Is this expected behavior and have others used this function successfully without issue?

I have also tried using Ostream and ZeroCopyFileStream as well with the same behavior.

0 Answers0