code: func EncodeToBytes(val interface{}) ([]byte, error) {
  	eb := encbufPool.Get().(*encbuf)
  	defer encbufPool.Put(eb)
  	eb.reset()
  	if err := eb.encode(val); err != nil {
  		return nil, err
  	}
  	return eb.toBytes(), nil
  }
docs: // EncodeToBytes returns the RLP encoding of val.
  // Please see the documentation of Encode for the encoding rules.