As a Roblox developer, it’s currently impossible to encode and decode base64 at a reasonable speed. Base64 is useful for dealing with binary data when the ASCII charset is forced.
Native solutions can hit speeds of several gigabytes per second, depending on what features are available. However, pure-lua implementations (such as mine) tend to only hit around (and very often under) 1 megabyte per second. That would absolutely lead to situations where the server or client would “freeze” for a short period of time because it’s busy encoding a large base64 payload.
Giving developers a faster base64 encoder/decoder would allow them to create more space-efficient compressed data without worrying about base64 speed. In addition to saving binary data in Datastores and sending it over RemoteEvents, base64 is also useful in dealing with various web APIs.
As such, I propose the base64 API would be as Base64Encode
and Base64Decode
methods under HttpService to be consistent with the JSON encoding/decoding methods.