#bencode #decoder #bittorrent #algorithm #forms #libtorrent

bdecode

A Bencode decoder in Rust which uses the same algorithm as libtorrent

1 unstable release

0.1.0 Oct 26, 2020

#1376 in Algorithms

MIT/Apache

9.5MB
1K SLoC

bdecode

Goals

  • Strictly adhere to the Bencode specification. Don't accept bencodings that are not in canonical form.
  • Minimize the use of external dependencies. Currently we only depend on the memchr crate.
  • Be reasonably performant.

Documentation

Documentation can be found at https://docs.rs/bdecode

Usage

Add this to your Cargo.toml:

[dependencies]
bdecode = "0.1"

and this to your crate root (if you're using Rust 2015):

extern crate bdecode;

License

This project is licensed under either of

at your option.


lib.rs:

A Bencode decoder in Rust.

Dependencies