removed some unnecessary stuff

This commit is contained in:
Izaya 2020-03-06 22:07:05 +11:00
parent f5262fad08
commit 7e41ce6ee2

View File

@ -23,14 +23,12 @@ end
local function readBuffer(fi)
local stream = {}
if fi:read(4) ~= "lz16" and not tO.f then
if fi:read(4) ~= "lz16" then
return false, "not an lz16 archive"
end
function stream.read()
local len = toint(fi:read(2) or "\0\0")
if len < 1 then
print("nothing")
coroutine.yield()
return nil
end
coroutine.yield()
@ -58,7 +56,6 @@ end
function lz16.buffer(stream)
if stream.mode.w then
print("write")
return writeBuffer(stream)
end
return readBuffer(stream)