README ¶ go-bencode Installation go get github.com/IncSW/go-bencode import bencode "github.com/IncSW/go-bencode" Quick Start data, err := bencode.Marshal(value) data, err := bencode.Unmarshal(value) Performance Go 1.16, Debian 9.1, i7-7700 Marshal Library Time Bytes Allocated Objects Allocated IncSW/go-bencode 795.9 ns/op 176 B/op 6 allocs/op marksamman/bencode 820.3 ns/op 384 B/op 8 allocs/op cristalhq/bencode 994.2 ns/op 928 B/op 4 allocs/op aleksatr/go-bencode 1061 ns/op 736 B/op 9 allocs/op nabilanam/bencode 2103 ns/op 1192 B/op 44 allocs/op jackpal/bencode-go 4676 ns/op 2016 B/op 45 allocs/op zeebo/bencode 4889 ns/op 1376 B/op 33 allocs/op Unmarshal Library Time Bytes Allocated Objects Allocated IncSW/go-bencode 1149 ns/op 960 B/op 18 allocs/op cristalhq/bencode 1160 ns/op 960 B/op 18 allocs/op nabilanam/bencode 1379 ns/op 1240 B/op 39 allocs/op aleksatr/go-bencode 2270 ns/op 1816 B/op 51 allocs/op jackpal/bencode-go 2577 ns/op 1688 B/op 59 allocs/op marksamman/bencode 2725 ns/op 5768 B/op 54 allocs/op zeebo/bencode 5988 ns/op 6392 B/op 92 allocs/op License MIT License. Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func Marshal(data interface{}) ([]byte, error) func MarshalTo(dst []byte, data interface{}) ([]byte, error) func Unmarshal(data []byte) (interface{}, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Marshal ¶ func Marshal(data interface{}) ([]byte, error) func MarshalTo ¶ func MarshalTo(dst []byte, data interface{}) ([]byte, error) func Unmarshal ¶ func Unmarshal(data []byte) (interface{}, error) Types ¶ This section is empty. Source Files ¶ View all Source files marshaler.go unmarshaler.go util.go Click to show internal directories. Click to hide internal directories.