Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 

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