ZeroCopyOutputStream into a streambuf
I would like to write a class that inherites from streambuf and adapts a ZeroCopyOutputStream (开发者_如何学Cgoogle/protobuf/io/) into a streambuf.
any ideas?
- write a proto description file and compile it to c++ code using protoc
- the generated c++ class has functions to read/write to stream: SerializeToOstream(ostream* stream) and ParseFromIstream(istream* stream)
You may need to create iostream from streambuf by yourself.
精彩评论