Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add Bencode examples

  • Loading branch information...
commit 434b1a5aaa7cac179a6c8bf69087f58d42ac1622 1 parent a8cb808
Konstantin Haase authored May 15, 2011

Showing 1 changed file with 7 additions and 6 deletions. Show diff stats Hide diff stats

  1. 13  README.md
13  README.md
Source Rendered
@@ -9,12 +9,13 @@ always knowing how many bytes to read.
9 9
 
10 10
 Objects look like this:
11 11
 
12  
-    Ruby          TNetstring      OTNetstring
13  
-    42            2:42#           2#42
14  
-    "hi"          2:hi,           2,hi
15  
-    true          4:true!         4!true
16  
-    [1]           4:1:1#}         3:{1#1
17  
-    {"a" => "b"}  8:1:a,=1:b,}    6{1,a1,b
  12
+    Ruby            TNetstring      OTNetstring     Bencode
  13
+    
  14
+    42              2:42#           2#42            i42e
  15
+    "hi"            2:hi,           2,hi            2:hi
  16
+    true            4:true!         4!true          (not possible)
  17
+    [1]             4:1:1#}         3:{1#1          li1ee
  18
+    {"a" => "b"}    8:1:a,=1:b,}    6{1,a1,b        d1:a1:be
18 19
 
19 20
 Similar implementations (both pure ruby, using recursion for nested objects) show the performance
20 21
 difference, esp. when simulating a network IO:

0 notes on commit 434b1a5

Please sign in to comment.
Something went wrong with that request. Please try again.