bencode-go icon indicating copy to clipboard operation
bencode-go copied to clipboard

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.

Results 5 bencode-go issues
Sort by recently updated
recently updated
newest added

Unlike the json encoder, this bencode implementation tries to encode unexported struct fields. Would it make sense to change the behavior to ignore such fields? I can work on PR.

I noticed that `bencode.Unmarshal()` creates a `bufio.Reader` from the passed-in reader. After `bencode.Unmarshal()` returns, the passed-in reader is left modified with the new index that the `bufio.reader` used to fill...

From BitTorrent's [BEP 3](https://www.bittorrent.org/beps/bep_0003.html), we need to calculate a hash of the `info` value (itself a bencoded dict) from a .torrent file: > Note that this is a substring of...

[sample.zip](https://github.com/jackpal/bencode-go/files/2321837/sample.zip)

When the data contains a large string length as in the example below, decodeString tries to allocate all of this memory upfront so the program crashes. ```golang package main import...