crates.ioDocs

Crate for encoding/decoding bencode

What is bencode? It's the encoding mostly used in .torrent files and BitTorrent protocol. For more info see BitTorrentSpecification#Bencoding.

Fast example

```rust

[derive(Debug, Serialize, Deserialize)]

struct MetaInfo { info: Info, announce: String, #[serde(rename = "announce-list")] announcelist: Option>>, #[serde(rename = "creation date")] creationdate: Option, comment: Option, #[serde(rename = "created by")] created_by: Option, encoding: Option, }

fn main(){ let string = serdebencoded::tostring(&MetaInfo{...}).unwrap; let mi: MetaInfo = serdebencoded::fromstr(&string).unwrap(); } ```