protobuf
protobuf copied to clipboard
[C#] Allow reuse of CodedInputStream and CodedOutputStream
CodedOutputStream
can take use flat array as the output. This is a great to just convert between object and bytes. Problem is an instance of CodedOutputStream
can only be used once.
Adding a Reset method allows you to reuse the same CodedOutputStream
to serialize different objects.
Same is true for CodedInputStream
.
See https://github.com/yufeih/protobuf/commit/d6ffc2f37cad8e85cbd71b1d144093250894aeb8