Maybe I'm doing a terrible job of using the Google, but these specifications for Bencoding keep referring to something known as "base ten ASCII", which makes me think it's different than regular ASCII. Could someone explain?
The base is explicitly stated to avoid confusion (although one might argue that base-10 is generally assumed by default).
Consider this: given the text representation of "12" (in ASCII), what is the numeric value?
However, in Bencode it's always base 10, so 42 (the integer) is encoded as "i42e".
A use of base-16 over base-10 might be to save a byte in longer ASCII-encoded numbers or to ensure a consistent pad size .. but base-10 fits in better with how numbers are commonly written and makes a Bencoded file more accessible. (That said, Bencoded files are generally not "human editted".)
"Base 10 ASCII," as used in this context, is not one thing. It just means that a base 10 number is represented using ASCII characters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With