Revert PlayStation LZ77 Compression

Doubts, help and support about QuickBMS and other game research tools
Eldinen
Posts: 10
Joined: Fri Apr 28, 2017 10:48 am

Revert PlayStation LZ77 Compression

Post by Eldinen »

I am using your amazing tool with this script:

http://aluigi.altervista.org/bms/ps_lz77.bms

The file :
https://drive.google.com/open?id=0B2552 ... kg4TlQxSmM

The script works perfectly, but, how can I revert the process? To be able to compress the file in the same Lz77 format again.

Thanks in advance!
Last edited by Eldinen on Wed Nov 01, 2017 5:17 pm, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Revert PlayStation LZ77 Compression

Post by aluigi »

Have you tried to use the decompressed file as-is with the original name and checking if the game loads it?
Because that lz77 seems a sort of gzip-like file, a single compressed file with a "LZ77" magic.

Worst case scenario you have to create a fake recompressor on your own (compressed size bigger than the uncompressed one)
Eldinen
Posts: 10
Joined: Fri Apr 28, 2017 10:48 am

Re: Revert PlayStation LZ77 Compression

Post by Eldinen »

I added the file I am trying to compress

https://drive.google.com/open?id=0B2552 ... kg4TlQxSmM

I havent tried if the game works with the decompressed file, in anycase, I guess I should put some fake header I guess.
Anyway, I will try.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Revert PlayStation LZ77 Compression

Post by aluigi »

A fake header is not enough mainly because it's not that easy, if you know C feel free to check the function ps_lz77_decompress in the src\unz.c source code of quickbms
Eldinen
Posts: 10
Joined: Fri Apr 28, 2017 10:48 am

Re: Revert PlayStation LZ77 Compression

Post by Eldinen »

Yes, i know C, but it isnot my main programming language hehe.

But, if you know how decompress the file with your algorithm, cant you revert the process?