ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Mar 08, 2021 10:48 pm

All times are UTC




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Feb 23, 2021 11:37 pm 

Joined: Sun Jul 03, 2016 12:20 pm
Posts: 6
Hello everyone,

I have a small problem with this file. I know it's a gzip file (normally) which contains the DDS file. (I had to rename the file, the extension ".gz" was not present in the original file, but the forum doesn't accept .dds extension...)

My problem is to recreate the compressed file. Even using the decompressed file, I can't get to the same original archive... So I must not have the right compression algorithm... So, when I reimport into the game, it crashes...

Can someone help me to find out how to recompress the file to the same original format?

Thanks a lot!


Attachments:
caution_en.dds.gz [112.76 KiB]
Downloaded 8 times
Top
   
PostPosted: Wed Feb 24, 2021 2:02 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12015
Automatic decompression and recompression:
Code:
get NAME filename
string NAME + ".new"

goto 4
get SIGN long
goto 0
if SIGN == 0x00088b1f
    comtype gzip
    get SIZE long
    savepos OFFSET
    get ZSIZE asize
    math ZSIZE - OFFSET
    clog NAME OFFSET ZSIZE SIZE
else
    comtype gzip_compress
    get SIZE asize
    log MEMORY_FILE 0 0
    put SIZE long MEMORY_FILE
    append
    clog MEMORY_FILE 0 SIZE SIZE
    append
    get SIZE asize MEMORY_FILE
    log NAME 0 SIZE MEMORY_FILE
endif


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited