danielgtaylor / danielgtaylor/python-betterproto

Support for coded streams

Aperta
#482 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
enhancement medium
Lingua principale
Python
Stelle
1.8k
Fork
234
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia esaminando le indicazioni collegate sullo streaming protobuf e la documentazione Java di CodedInputStream e CodedOutputStream, quindi verifica come betterproto rappresenta e serializza attualmente i messaggi. Definisci un'API per leggere e scrivere messaggi delimitati dalla lunghezza e incorniciati tramite varint, quindi verifica che gli stream prodotti da Python possano essere consumati dalle implementazioni documentate in C++ e Java.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
backend-api-design
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.