bendy
bendy copied to clipboard
A rust library for encoding and decoding bencode with enforced cannonicalization rules.
Right now this draft only parameterizes the decoding part to ensure the given structure matches the expectations of @thequux. I am going to implement the encoding part as soon as...
I just noticed, that your `MapAccess` and `SeqAccess` implementors does not implement `size_hint`, but it seems that should be pretty easy to implement.
[BEP 9](https://www.bittorrent.org/beps/bep_0009.html) (the protocol for resolving magnet URIs) defines a data packet that consists of a bencoded dictionary followed by arbitrary data (actually a slice of a torrent's info dict),...
Hi folks, I use Bendy in my project for decoding a bencode and it worked very well for me so far. But data on the Internet is not well-formed in...
The current display message is defined as https://github.com/P3KI/bendy/blob/92c6e07493e5bd61d605e59430067edda7e7f3e7/src/decoding/error.rs#L52 but based on the usage in https://github.com/P3KI/bendy/blob/92c6e07493e5bd61d605e59430067edda7e7f3e7/src/decoding/error.rs#L90-L95 it should be the other way around.
Hi there, Thanks for the handy library! I'm trying to deserialize an `ip` block from the Bittorrent DHT according to [BEP 5](https://www.bittorrent.org/beps/bep_0005.html). I can use the following to deserialize the...
This pull requests introduces a new `StateTracker` trait, based on the public interface of the old `StateTracker` struct. To avoid any naming clashes the old struct got renamed into `StrictTracker`....
Per the documentation in `encoding.rs`, MAX_DEPTH of a variable-sized object should be set to 0 and then explicitly padded when creating the decoder. This will fix #37 properly, but is...
If [cfg(doctest)](https://github.com/rust-lang/rust/issues/62210) stabilized (or `cfg(test)` got fixed), we can use [doc-comment](https://crates.io/crates/doc-comment) for including code in `README` in doc-test, then we can remove `tests/readme.rs`.
The name of an unexpected field is generally available to client code as a `&[u8]`; it would be much more convenient to be able to report that directly than to...