dedis / protobuf

Reflection-based Protocol Buffers for Go
GNU General Public License v2.0
76 stars 15 forks source link

Golang Encoder / Decoder interface #10

Open nikkolasg opened 8 years ago

nikkolasg commented 8 years ago

Would it be possible to implement an Encoder and Decoder interface for protobuf so we can use it like others encoding libraries ? For networking, it would mean a real improvement if we could have something

dec := protobuf.NewDecoder(conn)
dec.Decode(&value)

Instead of having to read all the bytes to a buffer and passing in protobuf.

nikkolasg commented 7 years ago

Linked to https://github.com/dedis/protobuf/issues/3