Open kit-ty-kate opened 7 months ago
after a short chat with @c-cube I'm realising that the spec talking about "fully-validated input" made me stray away from what I really want to know:
# let buf = Buffer.create 10;;
val buf : Buffer.t = <abstr>
# Bencode.encode (`Buffer buf) (Bencode.decode (`String "i04e"));;
Since it's not, my question then becomes only:
The BitTorrent Protocol Specification specifies an
info_hash
value defined as:Currently in the bencode library there doesn't seem to be a way to keep around the original bencoded substring corresponding to a part of the structure, so currently I'm simply re-encoding the decoded data.
So given the above note, I'm wondering: