Super-fast bencode parser written in Rust.
```rust let bs = "d4:listli1ei2ee4:ping4:ponge".as_bytes(); // Bencode data to parse.
let reader = BenReader::from_bytes(bs);
let mut root = reader.root(); // Get root object
// Iterate through list of numbers for item in root.get("list").iter_numbers() { // ... }
// Get byte value from dict let val = root.get("ping").bytes().unwrap();
// The parser is fault tolerant. let val = root.get("ping").get("some_other").bytes(); // --> Returns None. ```
This library is especially fast, if you query dict entries alphabetically.
```rust root.get("a").bytes().unwrap(); // Query bytes root.get("b").number().unwrap(); // Query number (isize) root.get("c").get("nestedentry").iterbytes();
// Caching is also useful. let c = root.get("c");
c.get("nestedentry1"); c.get("nestedentry2"); // ... ```