I have decompressed this TIM file of a PS1 game by using the game's ASM code, but I need to re-compress it now.
It seems to be a LZSS-like compression. 1st byte is 0x01, the next 4 bytes are the final size, the rest is the compressed data, with 2-byte flags to declare literal and compressed. Compressed bytes are 16-bit too: 5 bits for length (plus 3) and 11 bits for distance (plus 1).
See the attached files for compressed and uncompressed files.
This is what I've tried without success:
comtype lzss "11 5 2 2 0"
get SIZE long
get ZSIZE asize
math ZSIZE - OFFSET
clog test OFFSET ZSIZE SIZE
Any help would be infinitely appreciated!