Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wngr/bencode-decode

Minimal, lean, no-bullshit, iterator-based bencode decoder.
https://github.com/wngr/bencode-decode

Last synced: 22 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# bencode-decode
WTFPL

Minimal, lean, no-bullshit, iterator-based [bencode](https://wiki.theory.org/index.php/BitTorrentSpecification#Bencoding) decoder.

```rust
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);
```