Replaced separate commands and reporters with just reporters (no more ugly global state that can get broken by unlucky warp timer)
Significantly optimized encoding format.
The original extension always uses 6 numbers per UTF-8 character in the original text. On ASCII this has an efficiency of 1.33 bits/number.
https://github.com/TurboWarp/extensions/issues/1449 proposed length-prefixed encoding which is a good improvement for pure ASCII strings. Most of the commonly used parts of ASCII have 2 digit or 3 digit decimals codes so let's just say it's an average of about 3.5 numbers per character in the input after adding the length prefix. That's about 2.28 bits/number of efficiency.
This PR does all encoding and decoding operations on UTF-8 binary instead. Each group of 3 bits in the binary is encoded by 1 decimal in [1, 8] (not using 0 to avoid leading zeros), so this has 3 bits/number of efficiency.
In theory we should be able to get $\log_2{10} \approx 3.321$ bits/number of efficiency with some smarter encoding. But I think this is already pretty good and the encoding/decoding routines shouldn't be too hard to port to other languages for people making bots.
The original extension always uses 6 numbers per UTF-8 character in the original text. On ASCII this has an efficiency of 1.33 bits/number.
https://github.com/TurboWarp/extensions/issues/1449 proposed length-prefixed encoding which is a good improvement for pure ASCII strings. Most of the commonly used parts of ASCII have 2 digit or 3 digit decimals codes so let's just say it's an average of about 3.5 numbers per character in the input after adding the length prefix. That's about 2.28 bits/number of efficiency.
This PR does all encoding and decoding operations on UTF-8 binary instead. Each group of 3 bits in the binary is encoded by 1 decimal in [1, 8] (not using 0 to avoid leading zeros), so this has 3 bits/number of efficiency.
In theory we should be able to get $\log_2{10} \approx 3.321$ bits/number of efficiency with some smarter encoding. But I think this is already pretty good and the encoding/decoding routines shouldn't be too hard to port to other languages for people making bots.