tafia / quick-protobuf

A rust implementation of protobuf parser
MIT License
452 stars 87 forks source link

Support streaming #107

Open Moxinilian opened 6 years ago

Moxinilian commented 6 years ago

While quick-protobuf supports reading messages over a stream by taking any type implementing std::io::Read, internally this will actually copy everything into a Vec and generate a reader from that in-memory buffer.

The Reader should be modified so that it can work with a generic kind of byte provider, not specifically a slice of bytes. This would allow for streaming, which is a performance gain as quick-protobuf can start treating the buffer before it fully arrives in memory from the network.

I may work on that if I have time/need it. But I'm opening this issue in case somebody else feels like doing it before I have the opportunity to.