danielgtaylor / danielgtaylor/python-betterproto

Support for coded streams

Abierto
#482 0 comentarios 1 reacción 0 asignados Ver en GitHub
enhancement medium
Lenguaje dominante
Python
Estrellas
1.8k
Forks
234
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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)

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.