Compress/Decompress LZS (The Quivering game)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Pakolmo
Posts: 52
Joined: Thu Jun 09, 2016 1:15 am

Compress/Decompress LZS (The Quivering game)

Post by Pakolmo »

I have a lot of *.RCS with LZS compression

Aluigi, can you do a script to compress and decompress the RCS files?

https://www.dropbox.com/s/qgfw74v79atkn ... t.rcs?dl=0
IDontKnowMuch
Posts: 12
Joined: Sat Apr 13, 2019 4:19 pm

Re: Compress/Decompress LZS (The Quivering game)

Post by IDontKnowMuch »

I'm not Aluigi but here you go :D To recompress, run quickbms with the -r option
Pakolmo
Posts: 52
Joined: Thu Jun 09, 2016 1:15 am

Re: Compress/Decompress LZS (The Quivering game)

Post by Pakolmo »

Thanks, but I can decompress, but no compress...
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Compress/Decompress LZS (The Quivering game)

Post by aluigi »

The correct decompression script is:

Code: Select all

    comtype lzs
    get ZSIZE asize
    xmath SIZE "ZSIZE * 10"
    get NAME basename
    clog NAME 0 ZSIZE SIZE

I don't know where is the rdesktop compression code, I see mppc_expand but not the compression.
IDontKnowMuch
Posts: 12
Joined: Sat Apr 13, 2019 4:19 pm

Re: Compress/Decompress LZS (The Quivering game)

Post by IDontKnowMuch »

:oops: Sorry I'm still pretty new to this, especially compression types. I was skeptical that the decompressed size was the same as the compressed size but it seemed to accept it :P
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: Compress/Decompress LZS (The Quivering game)

Post by chrrox »

this page?
https://github.com/FreeRDP/FreeRDP/blob ... dec/mppc.c
int mppc_compress(MPPC_CONTEXT* mppc, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData,
UINT32* pDstSize, UINT32* pFlags)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Compress/Decompress LZS (The Quivering game)

Post by aluigi »

Good but not so easy.

The compressed data doesn't work, it's something related to the history size probably but no solution yet.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Compress/Decompress LZS (The Quivering game)

Post by aluigi »

I confirm, it's not 100% compatible.