#bencode #decode #lean #decoder #parser #iterator-based #no-bullshit

bencode-decode

Minimal, lean, no-bullshit, iterator-based bencode decoder

1 unstable release

0.1.0 Mar 31, 2020

#5 in #lean

WTFPL license

40KB
144 lines

bencode-decode

WTFPL

Minimal, lean, no-bullshit, iterator-based bencode decoder.

use bencode_decode::{Parser, decode};
use std::fs::File;

let f = File::open("./test/ubuntu-18.04.4-live-server-amd64.iso.torrent").unwrap();
let mut parser = Parser::new(f);
let res = decode(&mut parser, None).unwrap();
println!("Your torrent file in its raw glory: {:?}", res);

No runtime deps