File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -30,18 +30,27 @@ Usage
3030
3131.. code-block :: python
3232
33- from bencoder import bencode, bdecode
33+ from bencoder import bencode, bdecode, bdecode2
3434
3535 assert bencode(" WWWWWW" ) == b ' 6:WWWWWW'
3636 assert bencode(233 ) == b ' i233e'
3737
3838 with open (" debian-8.3.0-amd64-netinst.iso.torrent" , " rb" ) as f:
3939 torrent = bdecode(f.read())
4040 print (torrent[' announce' ])
41+
42+ decoded, length = bdecode2(b ' 6:WWWWWWi233e' )
43+ assert decoded == b ' WWWWWW'
44+ assert length == 8
4145
4246 ChangeLog
4347----------
4448
49+ Version 1.2.0
50+ ~~~~~~~~~~~~~~~
51+
52+ + Add `bdecode2 ` method. `#6 <https://github.com/whtsky/bencoder.pyx/pull/6 >`_
53+
4554Version 1.1.3
4655~~~~~~~~~~~~~~~
4756
Original file line number Diff line number Diff line change 1212
1313# Based on https://github.com/karamanolev/bencode3/blob/master/bencode.py
1414
15- __version__ = ' 1.1.3 '
15+ __version__ = ' 1.2.0 '
1616
1717import array
1818
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ def get_tag(self):
9797
9898setup (
9999 name = 'bencoder.pyx' ,
100- version = '1.1.3 ' ,
100+ version = '1.2.0 ' ,
101101 description = 'Yet another bencode implementation in Cython' ,
102102 long_description = open ('README.rst' , 'r' ).read (),
103103 author = 'whtsky' ,
You can’t perform that action at this time.
0 commit comments