forked from bencode to support latest version of python
- extra cython extension to speedup
typing
with mypy check
from pprint import pprint
from bencode import bdecode, bencode
with open("test.torrent", "rb") as f:
data = f.read()
raw = bdecode(data)
pprint(raw)
assert bencode(raw) == data
- There are alias function
loads
forbdecode
anddumps
forbencode
git clone https://github.com/synodriver/fast-bencode.git
cd fast-bencode
python setup.py build_ext -i