A simple and efficient Bencode encoder/decoder. 🛠️
Bencode is the encoding format used by the BitTorrent protocol for storing and transmitting data. This repository provides a lightweight implementation for encoding and decoding Bencoded data. 🔄
- ✅ Encode Python data structures (dict, list, int, bytes) into Bencode format.
- ✅ Decode Bencoded data back into Python objects.
- ✅ Simple and efficient implementation. ⚡
Clone the repository:
$ git clone https://github.com/yourusername/bencode-parser.git
$ cd bencode-parserfrom bencode import Encoder
data = {"key": "value", "number": 42, "list": [1, 2, 3]}
Encoder(data).encode()from bencode import Decoder
data = b"d3:key5:value6:numberi42e4:listli1ei2ei3ee"
Decoder(data).decode()This project is licensed under the MIT License. See LICENSE for details. 📝
0youcef ✨