OC-PsychOS2/module/bootloader.lua

21 lines
542 B
Lua
Raw Permalink Normal View History

2020-06-03 10:09:37 +10:00
_OSVERSION="PsychOS 2.0a2-$[[git rev-parse --short HEAD]]"
function lzss_decompress(a)local b,c,d,e,j,i,h,g=1,'',''while b<=#a do
e=c.byte(a,b)b=b+1
for k=0,7 do h=c.sub
g=h(a,b,b)if e>>k&1<1 and b<#a then
i=c.unpack('>I2',a,b)j=1+(i>>4)g=h(d,j,j+(i&15)+2)b=b+1
end
b=b+1
c=c..g
d=h(d..g,-4^6)end
end
return c end
local oload = load
function load(src, ...)
if (src:sub(1,4) == "\27ZLS") then
src = lzss_decompress(src:sub(5))
end
return oload(src, ...)
end
load($[[ luacomp -mluamin module/init.lua | lua zlua.lua | lua escape.lua ]])()