Bencode

A zero dependency bencode parsing library.

Usage + Examples

check out examples/ubuntu_torrent.rs

cargo run --example ubuntu_torrent

```rust // get your torrent file as bytes. let ubuntutorrentfile: Vec = std::fs::read("torrent_files/ubuntu.torrent").unwrap();

// Bencode::frombytes will traverse the byte array and read it into a bencode object. let ubuntutorrentbencode: Bencode = Bencode::frombytes(ubuntutorrentfile.as_slice()) // it returns a Result<(Bencode, usize), BencodeError> .unwrap() // the first item is the Bencode tree, // the second object is the index of the last parsed byte. .0; ```

Roadmap

Todo List