File tree 3 files changed +12
-3
lines changed
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -30,18 +30,27 @@ Usage
30
30
31
31
.. code-block :: python
32
32
33
- from bencoder import bencode, bdecode
33
+ from bencoder import bencode, bdecode, bdecode2
34
34
35
35
assert bencode(" WWWWWW" ) == b ' 6:WWWWWW'
36
36
assert bencode(233 ) == b ' i233e'
37
37
38
38
with open (" debian-8.3.0-amd64-netinst.iso.torrent" , " rb" ) as f:
39
39
torrent = bdecode(f.read())
40
40
print (torrent[' announce' ])
41
+
42
+ decoded, length = bdecode2(b ' 6:WWWWWWi233e' )
43
+ assert decoded == b ' WWWWWW'
44
+ assert length == 8
41
45
42
46
ChangeLog
43
47
----------
44
48
49
+ Version 1.2.0
50
+ ~~~~~~~~~~~~~~~
51
+
52
+ + Add `bdecode2 ` method. `#6 <https://github.com/whtsky/bencoder.pyx/pull/6 >`_
53
+
45
54
Version 1.1.3
46
55
~~~~~~~~~~~~~~~
47
56
Original file line number Diff line number Diff line change 12
12
13
13
# Based on https://github.com/karamanolev/bencode3/blob/master/bencode.py
14
14
15
- __version__ = ' 1.1.3 '
15
+ __version__ = ' 1.2.0 '
16
16
17
17
import array
18
18
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ def get_tag(self):
97
97
98
98
setup (
99
99
name = 'bencoder.pyx' ,
100
- version = '1.1.3 ' ,
100
+ version = '1.2.0 ' ,
101
101
description = 'Yet another bencode implementation in Cython' ,
102
102
long_description = open ('README.rst' , 'r' ).read (),
103
103
author = 'whtsky' ,
You can’t perform that action at this time.
0 commit comments