# dht-bencode

> bencoding with Buffers instead of strings

Latest version **0.1.2** (published 2011-08-08) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install dht-bencode
pnpm add dht-bencode
yarn add dht-bencode
bun add dht-bencode
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2011-08-08 |
| First published | 2011-01-29 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Stefan Bühler |
| Maintainers | stbuehler |

## Links

- npm: https://www.npmjs.com/package/dht-bencode
- Repository: https://github.com/stbuehler/nodejs-dht-bencode
- npm.io page: https://npm.io/package/dht-bencode

## Recent versions

- 0.1.2 (latest) — 2011-08-08
- 0.1.1 — 2011-01-29

## README

# dht-bencode

[bencode](http://bittorrent.org/beps/bep_0003.html#the-connectivity-is-as-follows "bencode reference") 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> }

---
_Source: https://npm.io/package/dht-bencode · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
