# fast-bencode
**Repository Path**: ilyar/fast-bencode
## Basic Information
- **Project Name**: fast-bencode
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: sds
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2023-10-16
- **Last Updated**: 2023-10-16
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
✨ fast-bencode ✨
The cython version of bencode
[](https://pypi.org/project/fast-bencode/)





### forked from [bencode](https://github.com/bittorrent/bencode) to support latest version of python
- extra cython extension to speedup
- ```typing``` with mypy check
### Usage
```python
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``` for ```bdecode``` and ```dumps``` for ```bencode```
### build
```bash
git clone https://github.com/synodriver/fast-bencode.git
cd fast-bencode
python setup.py build_ext -i
```