juicy_bencode

A little parser for bencode using the Nom library. Nom eats input byte by bytes, and bencode is such juicy input!

The crate provides both more individual parses for parsing out individual bencode items or just a blob.

TL; DR

You have a bencoded blob containing the torrent information for totally legal files,

```rust // pub enum BencodeItemView<'a> { // Integer(i64), // ByteString(&'a [u8]), // List(Vec>), // Dictionary(BTreeMap<&'a [u8], BencodeItemView<'a>>), // }

use juicybencode::parsebencodedict; fn main () -> Result<(), Box>{ // the library uses byte slices let text: &[u8] = input(); // now you can do totally legal things with the info! let parsedtree: BencodeItemView = parsebencodedict(text)?; }

```