Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/wngr/bencode-decode
- Owner: wngr
- License: wtfpl
- Created: 2020-03-31T18:42:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-03-31T19:03:22.000Z (over 4 years ago)
- Last Synced: 2024-10-04T22:25:32.070Z (about 1 month ago)
- Language: Rust
- Size: 37.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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);
```