Changed from LGPL'd base64 lib to more permissive one
Changed from LGPL'd base64 encode and decode implementations to more permissivly licensed ones, taken from the BaseXX library.
Good idea... Nevertheless I'll ask the author of the current code for a license change first. Have you checked other alternatives besides the one you propose? Why did you pick this one? The implementations looks pretty clean, but I see some arrays of bits being instantiated in a loop in there, and wonder about performance...
Hi xopxe - is there a chance that this can get merged? Or is the loop issue you identified still an issue?
Hi. Sorry I didn't get back on this. I didn't profile, but the implementation you provided does look inneficient, with lots of table.inserts and string.gsubs. Have you looked at the implementation at https://github.com/iskolbin/lbase64/blob/master/base64.lua ? It's the base64 rock from luarocks, and It's MIT / Public Domain. It also can take advantage of binary operators when available (Lua 5.3+, LuaJIT).