CC-Tweaked icon indicating copy to clipboard operation
CC-Tweaked copied to clipboard

[Suggestion] Add base64 built in

Open Soapy7261 opened this issue 5 months ago • 5 comments

Useful information to include:

  • A function like textutils.base64.encode(stringofbinaryornonbinarydatahere), or like how python has it with the base64 package having b64encode/b64decode along with b32encode/b32decode under the same base64 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.

Soapy7261 avatar Aug 30 '24 05:08 Soapy7261