danielgtaylor / danielgtaylor/python-betterproto
Support for coded streams
- Ngôn ngữ chính
- Python
- Star
- 1.8k
- Fork
- 234
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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)
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng việc xem lại hướng dẫn protobuf streaming được liên kết và tài liệu Java về CodedInputStream và CodedOutputStream, sau đó kiểm tra cách betterproto hiện biểu diễn và tuần tự hóa các message. Xác định một API để đọc và ghi các message length-delimited, varint-framed, đồng thời xác minh rằng các stream do Python tạo ra có thể được các implementation C++ và Java được tài liệu hóa tiêu thụ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- backend-api-design
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100