README ¶ go-bencode Installation go get github.com/IncSW/go-bencode import bencode "github.com/IncSW/go-bencode" Quick Start data, err := Marshal(value) data, err := Unmarshal(value) Performance Go 1.13.1, Debian 9.1, i7-7700 Marshal Library Time Bytes Allocated Objects Allocated IncSW/go-bencode 485 ns/op 16 B/op 2 allocs/op marksamman/bencode 897 ns/op 400 B/op 8 allocs/op chihaya/bencode 1846 ns/op 1010 B/op 53 allocs/op nabilanam/bencode 2027 ns/op 1216 B/op 44 allocs/op jackpal/bencode-go 4968 ns/op 2128 B/op 57 allocs/op zeebo/bencode 5147 ns/op 1488 B/op 45 allocs/op Unmarshal Library Time Bytes Allocated Objects Allocated nabilanam/bencode 1341 ns/op 1264 B/op 39 allocs/op IncSW/go-bencode 1435 ns/op 1248 B/op 25 allocs/op jackpal/bencode-go 2652 ns/op 1712 B/op 59 allocs/op marksamman/bencode 2877 ns/op 5920 B/op 66 allocs/op chihaya/bencode 2896 ns/op 5904 B/op 61 allocs/op zeebo/bencode 6595 ns/op 6576 B/op 99 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.gounmarshaler.goutil.go Directories ¶ Show internal Expand all Path Synopsis benchmarks Click to show internal directories. Click to hide internal directories.