code: func (dec *Decoder) Decode(pb proto.Message) error {
  	buf, err := ioutil.ReadAll(dec.r)
  	if err != nil {
  		return err
  	}
  
  	return proto.Unmarshal(buf, pb)
  }
docs: // Decode reads all bytes from the reader and unmarshals them into pb.