xopxe / lumen

Lua Multitasking Environment.
Other
153 stars 23 forks source link

Changed from LGPL'd base64 lib to more permissive one #16

Open ghost opened 8 years ago

ghost commented 8 years ago

Changed from LGPL'd base64 encode and decode implementations to more permissivly licensed ones, taken from the BaseXX library.

xopxe commented 8 years ago

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...

lePereT commented 3 years ago

Hi xopxe - is there a chance that this can get merged? Or is the loop issue you identified still an issue?

xopxe commented 3 years ago

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).