]> Cypherpunks repositories - gostls13.git/commit
gob: when possible, allow sequential decoders on the same input stream.
authorRob Pike <r@golang.org>
Wed, 5 Oct 2011 16:47:09 +0000 (09:47 -0700)
committerRob Pike <r@golang.org>
Wed, 5 Oct 2011 16:47:09 +0000 (09:47 -0700)
commit457dfd7546990e84247695fe2be6952e7ec3e59c
tree3fc5bf9080b9b7d656b092f03b725b297a9a1299
parent305f167b017f83a243754f800cbf37cbc37558f6
gob: when possible, allow sequential decoders on the same input stream.
This can work only if there is no type info required to initialize the decoder,
but it's easy and gains a few percent in the basic benchmarks by avoiding
bufio when it's a bytes.Buffer - a testing-only scenario, I admit.
Add a comment about what Decode expects from the input.

R=rsc
CC=golang-dev
https://golang.org/cl/5165048
src/pkg/gob/decoder.go
src/pkg/gob/encoder_test.go