Skip to content
0youcefPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Bencode Parser 🚀

A simple and efficient Bencode encoder/decoder. 🛠️

📖 Overview

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. 🔄

✨ Features

  • ✅ Encode Python data structures (dict, list, int, bytes) into Bencode format.
  • ✅ Decode Bencoded data back into Python objects.
  • ✅ Simple and efficient implementation. ⚡

📦 Installation

Clone the repository:

$ git clone https://github.com/yourusername/bencode-parser.git
$ cd bencode-parser

🚀 Usage

📝 Encoding

from bencode import Encoder

data = {"key": "value", "number": 42, "list": [1, 2, 3]}
Encoder(data).encode()

🔍 Decoding

from bencode import Decoder

data = b"d3:key5:value6:numberi42e4:listli1ei2ei3ee"
Decoder(data).decode()

📜 License

This project is licensed under the MIT License. See LICENSE for details. 📝

👤 Author

0youcef ✨

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages