danielgtaylor / danielgtaylor/python-betterproto
Support for coded streams
- 主要语言
- Python
- 星标
- 1.8k
- 派生
- 234
- PR 合并指标
- 30 天内没有已合并 PR
描述
C++ and Java implementations of protocol buffers have support for [writing and reading multiple messages](https://protobuf.dev/programming-guides/techniques/#streaming) 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:
* [CodedInputStream](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/CodedInputStream.html)
* [CodedOutputStream](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/CodedOutputStream)
贡献指南
调研方向
首先查看链接的 protobuf 流式处理指南以及 Java CodedInputStream 和 CodedOutputStream 文档,然后检查 betterproto 当前如何表示和序列化消息。定义用于读取和写入 length-delimited、varint-framed 消息的 API,并验证 Python 输出的流可以由文档所述的 C++ 和 Java 实现使用。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- backend-api-design
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100