CC-Tweaked
CC-Tweaked copied to clipboard
[Suggestion] Add base64 built in
Useful information to include:
- A function like
textutils.base64.encode(stringofbinaryornonbinarydatahere)
, or like how python has it with thebase64
package havingb64encode
/b64decode
along withb32encode
/b32decode
under the samebase64
package - Things like web socket sending require encoding binary data as Base64, there are LUA packages that do this, but they are quite slow for large amounts of binary data, it would be nice if it was included (using a java implementation ideally so it could be done faster), other bases (like base32) would be nice too.
- I have considered using
textutils.urlEncode()
, and it does work for smaller strings of binary data, but it has a bug(?) where if the string is too big, it never yields so you get the dreaded 'Too long without yielding' error, even if that was fixed it would still be nice to have base64 built in.