diff options
| author | Felix Hanley <felix@userspace.com.au> | 2019-10-29 10:58:47 +0000 |
|---|---|---|
| committer | Felix Hanley <felix@userspace.com.au> | 2019-10-29 10:58:47 +0000 |
| commit | eda2530094e72463f6aef6e7f9bf524002e248fa (patch) | |
| tree | 66e987a6229a159c0eb19c448b3af04db5f56733 /vendor/github.com/felix/go-bencode/README.md | |
| parent | fbc564026fa84c7f9142cdcf60accdf6b5bdaeaf (diff) | |
| download | dhtsearch-eda2530094e72463f6aef6e7f9bf524002e248fa.tar.gz dhtsearch-eda2530094e72463f6aef6e7f9bf524002e248fa.tar.bz2 | |
Remove vendored files and create go.mod
Diffstat (limited to 'vendor/github.com/felix/go-bencode/README.md')
| -rw-r--r-- | vendor/github.com/felix/go-bencode/README.md | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/vendor/github.com/felix/go-bencode/README.md b/vendor/github.com/felix/go-bencode/README.md deleted file mode 100644 index 6ff740e..0000000 --- a/vendor/github.com/felix/go-bencode/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# go-bencode - -A Go library for handling data in the bencode format. This is the format used -by the Mainline DHT and BitTorrent protocols. - - -## Install - - go get -u github.com/felix/go-bencode - - -## Usage - -All encoded data objects are `[]byte`. This is the format returned by many -network libraries such as `UDPConn.Read()` etc. - - import bencode "github.com/felix/go-bencode" - - var i interface{} - var packet []byte - var str string - - i, err = bencode.Decode(packet) - - // Or if you know the type - str, err = bencode.DecodeString(packet) - - // Encoding a string, int, slice or map - packet, err = bencode.Encode(str) - -## Benchmarks - -Just for fun, and a comparison. - - go test -bench=. - - BenchmarkFelix-4 100000 16544 ns/op - BenchmarkMarkSamman-4 50000 32664 ns/op - BenchmarkJackpal-4 50000 36755 ns/op - |
