Skip to content

A Go language binding for encodeing and decoding data in the bencode format that is used by the BitTorrent peer-to-peer file sharing protocol.

License

Notifications You must be signed in to change notification settings

gravity-protocol/bencode-go

 
 

Repository files navigation

bencode-go

A Go language binding for encoding and decoding data in the bencode format that is used by the BitTorrent peer-to-peer file sharing protocol.

Quick Start

Get the package

go get -u github.com/jackpal/bencode-go

Import the package

import bencode "github.com/jackpal/bencode-go"

Unmarshal a bencode stream into an object

data := myAwesomeObject{}
err := bencode.Unmarshal(reader, &data)

Decode a bencode stream

data, err := bencode.Decode(reader)

Encode an object into a bencode stream

err := bencode.Marshal(writer, data)

Complete documentation

http://godoc.org/github.com/jackpal/bencode-go

License

This project is licensed under the Go Authors standard license. (See the LICENSE file for details.)

About

A Go language binding for encodeing and decoding data in the bencode format that is used by the BitTorrent peer-to-peer file sharing protocol.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%