ahsan-javaid / bittorrent-rs

0 stars 0 forks source link

Decode bencoded lists #3

Open ahsan-javaid opened 3 months ago

ahsan-javaid commented 3 months ago

Extend the decode command to support bencoded lists.

Lists are encoded as le.

For example, ["hello", 52] would be encoded as l5:helloi52ee. Note that there are no separators between the elements.

Here’s how the tester will execute your program:

$ ./your_bittorrent.sh decode l5:helloi52ee [“hello”,52] If you'd prefer to use a library crate for this stage, serde-bencode is available for you to use.

ahsan-javaid commented 3 months ago

Example input: l5:helloi52ee