Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 466 Bytes

README.md

File metadata and controls

15 lines (11 loc) · 466 Bytes

Bencode parser

Bencode is the format used in Bittorrent files. It's a very simplistic format. All it knows about are strings, integers, lists and dictionaries (also known as hash maps).

Using nom I wrote a small parser able to parse all this.

let data = "l5:jelly4:cake7:custarde".as_bytes();
let obj = bencode::value(data);