comtype LZSS0
savepos BASE
get FILES long
math FILES / 4
print "%FILES%"
goto 0
for i = 0 < FILES
get OFFSET long
putarray 0 i OFFSET
next i
get SIZE asize
putarray 0 FILES SIZE
math FILES - 1
for i = 0 < FILES
set j i
math j + 1
set k j
math k + 1
getarray OFFSET 0 i
getarray SIZE 0 j
getarray SIZE2 0 k
if OFFSET > 0 && SIZE = 0
  set SIZE SIZE2
endif
math SIZE - OFFSET
if SIZE > 0 && OFFSET > 0
  math OFFSET + BASE
  log MEMORY_FILE OFFSET SIZE
  get TSIZE long MEMORY_FILE
  get SIZE asize MEMORY_FILE
  print "%TSIZE%"
  if TSIZE > 0x1FFFFF || TSIZE < 0x100
    log "" 0 SIZE MEMORY_FILE
  else
    math SIZE - 4
    clog "" 4 SIZE TSIZE MEMORY_FILE
  endif
else
  log "" 0 0
endif
next i
