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.