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

https://github.com/nomyfan/bencodex

Bencode parser
https://github.com/nomyfan/bencodex

bencode bencode-parser rust rust-crate rust-library

Last synced: 2 months ago
JSON representation

Bencode parser

Awesome Lists containing this project

README

        

# bencodex

A bencode parser.

## Get Started

```rust
use bencodex::{BDict, BNode};

let mut dict = BDict::new();
dict.insert("bar".to_string(), "spam".into());
dict.insert("foo".to_string(), 42.into());

let bnode = BNode::Dict(dict);

let mut file = File::create(
env::current_dir().unwrap().join("name.torrent")
).unwrap();
bnode.serialize(&mut file).unwrap();
```