python-betterproto icon indicating copy to clipboard operation
python-betterproto copied to clipboard

Support for coded streams

Open a-khabarov opened this issue 2 years ago • 0 comments

C++ and Java implementations of protocol buffers have support for writing and reading multiple messages via CodedOutputStream and CodedInputStream . This is also space-efficient because the size of each message can be represented as a varint.

I think having something similar to CodedOutputStream and CodedInputStream in betterproto would be useful. One use case would be when a Python tool uses betterproto to emit a binary stream of messages using this and then a C++/Java tool can use CodedInputStream to read the stream.

Related Java documentation:

a-khabarov avatar May 02 '23 09:05 a-khabarov