Skip to content

Commit 77cf036

Browse files
committed
performance tweaks, more spec compatible, new version. bigger, better, faster, stronger...
1 parent 365b3a6 commit 77cf036

File tree

3 files changed

+53
-17
lines changed

3 files changed

+53
-17
lines changed

CHANGES.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## 0.4.3
2+
* improved performance a lot
3+
* dropped support for de- and encoding floats to respect the spec
4+
5+
*note:* node-bencode will still decodes stuff like "i42.23e" but will cast the
6+
result to an interger
7+
8+
## 0.4.2
9+
* bugfix: sort dictionary keys to follow the spec
10+
11+
## 0.4.1
12+
* bugfix: number decoding was kinda broken
13+
14+
## 0.4.0
15+
* fixed problems with multibyte strings
16+
* some performance improvements
17+
* improved code quality
18+
19+
## 0.3.0
20+
* #decode() accepts a encoding as its second paramtere
21+
22+
## 0.2.0
23+
* complete rewrite, @jhermsmeier joins the team
24+
25+
## 0.1.0
26+
* added encoding
27+
28+
## 0.0.1
29+
First version, decoding only

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@ npm install bencode
3838

3939
### encode
4040
```
41-
bencode x 5,316 ops/sec ±2.06% (87 runs sampled)
42-
bencoding x 5,850 ops/sec ±1.43% (88 runs sampled)
43-
dht-bencode x 6,826 ops/sec ±2.88% (93 runs sampled)
44-
bncode x 5,563 ops/sec ±2.96% (86 runs sampled)
45-
dht.js x 9,044 ops/sec ±0.91% (91 runs sampled)
41+
bencode x 7,939 ops/sec ±2.22% (74 runs sampled)
42+
bencoding x 5,632 ops/sec ±1.47% (86 runs sampled)
43+
dht-bencode x 6,403 ops/sec ±3.45% (87 runs sampled)
44+
bncode x 5,106 ops/sec ±3.63% (82 runs sampled)
45+
dht.js x 7,972 ops/sec ±2.22% (84 runs sampled)
4646
```
4747

4848
### decode
4949
```
50-
bencode x 23,051 ops/sec ±1.05% (99 runs sampled)
51-
bencoding x 27,666 ops/sec ±0.95% (95 runs sampled)
52-
dht-bencode x 25,628 ops/sec ±0.90% (100 runs sampled)
53-
bncode x 1,080 ops/sec ±1.31% (97 runs sampled)
54-
dht.js x 22,021 ops/sec ±0.86% (101 runs sampled)
50+
bencode x 29,588 ops/sec ±0.75% (99 runs sampled)
51+
bencoding x 27,844 ops/sec ±1.97% (95 runs sampled)
52+
dht-bencode x 22,975 ops/sec ±1.84% (90 runs sampled)
53+
bncode x 990 ops/sec ±2.71% (88 runs sampled)
54+
dht.js x 19,103 ops/sec ±2.14% (89 runs sampled)
5555
```
5656

57-
*all benchmarks from an Intel [email protected] with node v0.10.0.*
57+
*all benchmarks from an Intel [email protected] with node v0.10.3.*
5858

5959
## Usage
6060

package.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
{
22
"name": "bencode",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"license": "MIT",
55
"description": "Bencode de/encoder",
66
"keywords": [ "torrent", "bittorrent", "bencode", "bdecode", "bencoding" ],
77

8-
"author": {
9-
"name": "Mark Schmale",
10-
"email": "[email protected]",
11-
"url": "http://masch.it/"
12-
},
8+
"contributors": [
9+
{
10+
"name": "Mark Schmale",
11+
"email": "[email protected]",
12+
"url": "http://masch.it/"
13+
},
14+
{
15+
"name": "Jonas Hermsmeier",
16+
"email": "[email protected]"
17+
}
18+
19+
],
1320

1421
"main": "bencode.js",
1522

0 commit comments

Comments
 (0)