YTSFlix_Go/vendor/github.com/anacrolix/torrent/bencode/bytes.go
2018-11-04 15:58:15 +01:00

19 lines
291 B
Go

package bencode
type Bytes []byte
var (
_ Unmarshaler = &Bytes{}
_ Marshaler = &Bytes{}
_ Marshaler = Bytes{}
)
func (me *Bytes) UnmarshalBencode(b []byte) error {
*me = append([]byte(nil), b...)
return nil
}
func (me Bytes) MarshalBencode() ([]byte, error) {
return me, nil
}