bencode

package module
v0.0.0-...-dd0b375 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2019 License: MIT Imports: 6 Imported by: 0

README

go-bencode

Software License Build Status Coverage Status Go Report Card Go Doc

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.

Documentation

Index

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL