#bencode #decode #decoder #minimal

bencode-decode

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

1 unstable release

0.1.0 Mar 31, 2020

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

͒^