How do I extract files using Lua?
Update: I now have the following code but it crashes every time it reaches the end of the function, but it successfully extracts al
The "lua-compress-deflatelua" repository on GitHub, by "davidm", implements the Gzip algorithm in plain Lua. Link: https://github.com/davidm/lua-compress-deflatelua (The files are in the lmod directory.)
Example usage:
local DEFLATE = require 'compress.deflatelua'
-- uncompress gzip file
local fh = assert(io.open('foo.txt.gz', 'rb'))
local ofh = assert(io.open('foo.txt', 'wb'))
DEFLATE.gunzip {input=fh, output=ofh}
fh:close(); ofh:close()