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.
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.