2020-03-31 21:59:58 +11:00
|
|
|
-- KOSNEO installer base
|
|
|
|
-- This is released into the public domain.
|
|
|
|
-- No warranty is provided, implied or otherwise.
|
|
|
|
|
|
|
|
-- DECOMPRESSION ENGINE PRECEDES THIS CODE --
|
|
|
|
|
|
|
|
while true do
|
|
|
|
$readInBlock = $filesystem.read($readInFile, 1024)
|
|
|
|
for i = 1, #$readInBlock do
|
|
|
|
-- Read-in state machine
|
2020-03-31 22:41:08 +11:00
|
|
|
$NT|readInChar
|
2020-03-31 21:59:58 +11:00
|
|
|
$readInChar = $readInBlock:sub(i, i)
|
|
|
|
if not $readInState then
|
|
|
|
if $readInChar == "\x00" then
|
|
|
|
$readInState = 0
|
|
|
|
end
|
|
|
|
elseif $readInState == 0 then
|
|
|
|
if $readInChar == "\xFE" then
|
|
|
|
$readInState = 1
|
|
|
|
else
|
|
|
|
$engineInput($readInChar)
|
|
|
|
end
|
|
|
|
else
|
|
|
|
$engineInput($readInChar)
|
|
|
|
$readInState = 0
|
|
|
|
end
|
|
|
|
end
|
2020-03-31 22:41:08 +11:00
|
|
|
$DT|readInChar
|
2020-03-31 21:59:58 +11:00
|
|
|
end
|
|
|
|
|
|
|
|
-- COMPRESSED DATA FOLLOWS THIS CODE --
|
|
|
|
|