I have created a zip compression library for LÖVE without any external (DLL/SO) libraries dependencies making it so easy to use.
I used zip.lua from LuaRocks, and a CRC32.lua library.
Patched zip.lua to use love.math.compress instead of lzlib/lua-zlib.
And modified CRC32.lua to work under LuaJIT and use bitop.
Oh, and a note: the path protection has been removed, so please provide the paths with '/' instead of '\', without any double slashes, and without a slash at the start.
Another note: The library doesn't scan sub-directories, but you can do that manually.
You can find the documentation in LoveZip/init.lua.
Usage Example:
Code: Select all
local zip = require("LoveZip")
function love.load()
zip.zip("/Result.zip", "test1.txt", "test2.txt", "test3", "test3/test4")
end
function love.draw()
love.graphics.setColor(255,255,255,255)
love.graphics.print("Done",50,50)
end
Enjoy, give feedback if possible.