# benko A zero dependency bencode parser and encoder written in rust. Want to use benko for Torrents? check out [tijb/torq](https://github.com/tijb/torq) ## Getting Started Check out the docs. [docs.rs/benko](https://docs.rs/benko) ## Examples **read from a file** ```rust let bytes: Vec = std::fs::read("my_file.torrent") .expect("Couldn't read file."); let bencode: Benc = Benc::parse(bytes) .expect("Couldn't parse bencode bytes"); ``` **encode to bytes** ```rust let bencode: Benc = Benc::Int(9001); let bytes: Vec = bencode.bytes(); ``` ## Issues? Feel free to put up a Pull Request, or open an Issue. `:)`