mirror of
https://github.com/20kdc/OC-KittenOS.git
synced 2024-11-15 06:58:05 +11:00
15 lines
479 B
Lua
15 lines
479 B
Lua
-- This is released into the public domain.
|
|
-- No warranty is provided, implied or otherwise.
|
|
|
|
-- This is a wrapper around (i.e. does not contain) Zopfli.
|
|
local frw = require("libs.frw")
|
|
|
|
return function (data, lexCrunch)
|
|
frw.write("tempData.bin", data)
|
|
os.execute("zopfli --i1 --deflate -c tempData.bin > tempZopf.bin")
|
|
local res = frw.read("tempZopf.bin")
|
|
os.execute("rm tempData.bin tempZopf.bin")
|
|
return lexCrunch.process(frw.read("deflate/instdeco.lua"), {}), res
|
|
end
|
|
|