Open GoogleCodeExporter opened 9 years ago
I can see the purpose. However, as you say, it would really only work for
memory buffer streams.
I wonder if instead the interface should be like
int maxbytes = stream->begin_buffer_write();
...
stream->end_buffer_write(bytes_written);
because that could work for further reducing the overhead of stream writes. It
would allow e.g. writing the submessage length after the submessage contents,
which is something that is quite inefficient in nanopb currently. And then even
non-memory streams could provide a small memory buffer for speed.
Original comment by Petteri.Aimonen
on 13 Dec 2014 at 7:57
Original issue reported on code.google.com by
robt...@google.com
on 12 Dec 2014 at 11:23Attachments: