Lz77 compression, SD0 Archive Gundam Ghiren

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
lsaint
Posts: 22
Joined: Tue Oct 04, 2016 10:55 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by lsaint »

Oh,

I attached the wrong file... (I don't think there are any names)

for some reason in other MKD files it crashes with this code


Image
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by aluigi »

Can you upload the MKD file that crashes?
Remember that I don't have the game so everytime you notice a problem you have to upload the file causing it.
lsaint
Posts: 22
Joined: Tue Oct 04, 2016 10:55 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by lsaint »

Sorry,

Common sense escaped me for that moment

https://mega.nz/#!WVMHiYqI!bq6Heid3zFQe ... 11mGRgdtrI

also because it uses chunks...the reimport function doesn't work, correct?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by aluigi »

My fault, it was a stupid bug I fixed some seconds after the upload of the script but forgot to reupload it :)
Script 0.1.1
lsaint
Posts: 22
Joined: Tue Oct 04, 2016 10:55 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by lsaint »

One final question,

I'm trying to program a re compresser/de comperessor

The C String at MEMORY_FILE10 binary is the Decompression Table right?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by aluigi »

No, MEMORY_FILE10 is just the compiled x86 function, the executable code.
lsaint
Posts: 22
Joined: Tue Oct 04, 2016 10:55 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by lsaint »

Ah thank you, so much to learn!
lsaint
Posts: 22
Joined: Tue Oct 04, 2016 10:55 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by lsaint »

Hey,

is it impossible to reimport with this script due to it being chunked?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by aluigi »

It's not possible to reimport the files because there is no recompression algorithm available.
BlackDog
Posts: 2
Joined: Mon Oct 24, 2016 8:23 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by BlackDog »

Quick question, aLuigi: would you share the source code used to compile that MEMORY_FILE10 DLL?
Did you have to implement the whole of what lsaint described in his long post?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by aluigi »

There is no source code.
That one is the original code taken from that tool you linked.
Holdenbrawlfield
Posts: 1
Joined: Tue Nov 01, 2016 3:12 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by Holdenbrawlfield »

Hi,

I'm looking into this game also, and apparently there are RIFF files in one of the archives
and the current script stops when it see's them. I've uploaded an example

https://mega.nz/#!DJlVgTiZ!LixZ0EKDXcPh ... wOrFto1kLI

Can you do an update?

also, what exact kind of compression is it? I've read the thread and the OP's post is hard to follow.
It appears to be some kind of variant of Lz77?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by aluigi »

Script 0.1.2
lsaint
Posts: 22
Joined: Tue Oct 04, 2016 10:55 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by lsaint »

ahh finally!

So here is the binary Luigi dumped, translated into a working program in C.

right now it can only handle single files.

now on to the long road to figuring out re-compression.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by aluigi »

Well done, less work for me when I will add it natively in quickbms :D
lsaint
Posts: 22
Joined: Tue Oct 04, 2016 10:55 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by lsaint »

Glad I could be of some assistance!

do you have any tips about understanding re compression?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by aluigi »

I suggest you to post on http://encode.ru, they can write a compressor on the fly.
lsaint
Posts: 22
Joined: Tue Oct 04, 2016 10:55 pm

Re: Lz77 compression, SD0 Archive Gundam Ghiren

Post by lsaint »

Hey,

Thanks for the help luigi and the guys at encode.ru! I have now achieved semi working compression....it's larger than the original but can be decompressed by the girenaxv program. It appears there is another compression on top of the lz and the rle: it avoids using markers for repeated literals. I haven't figured it out yet.

but if anyone is interested I'm attaching my test program....

slow and steady