Offzip Compression problem [prototype 2 rz]

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
gokhan935
Posts: 2
Joined: Mon Aug 20, 2018 4:25 pm

Offzip Compression problem [prototype 2 rz]

Post by gokhan935 »

I try to translate protoype 2, I found everything to translate. Altough main translation file can be extracted with offzip without problem, my problem is how to recompress this file. How can i do it?
I uploaded the files, please i need your help.
Last edited by gokhan935 on Mon Dec 17, 2018 1:57 am, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Offzip Compression problem

Post by aluigi »

Script for automatic decompression and recompression (no need of reimporting):

Code: Select all

# Prototype 2 RZ
get EXT extension
if EXT == "RZ"  # conflict with idstring/putdstring
    idstring "RZ"
    getdstring ZERO 6
    get SIZE longlong
    savepos OFFSET
    get ZSIZE asize
    math ZSIZE - OFFSET
    get NAME basename
    clog NAME OFFSET ZSIZE SIZE
else
    comtype zlib_compress
    log MEMORY_FILE 0 0
    putdstring "RZ" 2 MEMORY_FILE
    for x = 0 < 6
        put 0 byte MEMORY_FILE
    next x
    get SIZE asize
    put SIZE longlong MEMORY_FILE
    get NAME filename
    string NAME + ".rz"
    log NAME 0 16 MEMORY_FILE
    append
    clog NAME 0 SIZE SIZE
    append
endif
sinnerclown380
Posts: 59
Joined: Tue Apr 07, 2020 10:34 am

Re: Offzip Compression problem [prototype 2 rz]

Post by sinnerclown380 »

Hi aluigi how can i compress the file with this script?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Offzip Compression problem [prototype 2 rz]

Post by aluigi »

Just use the same script on the decompressed file and it will generate the new rz one.
sinnerclown380
Posts: 59
Joined: Tue Apr 07, 2020 10:34 am

Re: Offzip Compression problem [prototype 2 rz]

Post by sinnerclown380 »

I used this compression code for prototype 2 but it was smaller than the original file and there was no change in the game.Does anyone have an idea?