Skip to content

Repository files navigation

BitTorrent bencode encode/decode

CircleCI Coveralls Typscript Dependences License Version Codacy Badge

Description

BitTorrent DHT KRPC protocol bencode (BEP 005) utils function write in typescript.

Installation

$ npm install @lemontv/bencode

Usage

import { encode, decode } from '@lemontv/bencode';

const request = encode({"t":"aa", "y":"q", "q":"ping", "a":{"id":"abcdefghij0123456789"}});

const response = decode(Buffer.from("d1:ad2:id20:abcdefghij0123456789e1:q4:ping1:t2:aa1:y1:qe"));

About

BitTorrent bencode

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages