Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
bencoding with Buffers instead of strings
JavaScript
tree: 68c4a24aa7

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
README.md
package.json

README.md

dht-bencode

bencode with Buffer()s from nodejs (as it is binary data, javascript string are not a good idea to handle it)

install

npm install dht-bencode

usage

var bencode = require('dht-bencode');

bencode.bencode({ t: 'ab' }).toString(); // should result in "d1:t2:abe"
bencode.bdecode("d1:t2:abe"); // should result in { t: <Buffer 61 62> }
Something went wrong with that request. Please try again.