how to compress file? (zlib compression) [FTS 15]

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Skoczek
Posts: 37
Joined: Wed Aug 25, 2021 10:10 pm

how to compress file? (zlib compression) [FTS 15]

Post by Skoczek »

FTS 15 uses zlib compression for data. I decompressed that, edited and I have to compress it back. How to do this?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: how to compress file? (zlib compression)

Post by aluigi »

Decompressed what file? How? With what tool?
Skoczek
Posts: 37
Joined: Wed Aug 25, 2021 10:10 pm

Re: how to compress file? (zlib compression)

Post by Skoczek »

aluigi wrote:Decompressed what file? How? With what tool?

players.dat
I decompressed that with offzip tool
How to compress it again?
Skoczek
Posts: 37
Joined: Wed Aug 25, 2021 10:10 pm

Re: how to compress file? (zlib compression)

Post by Skoczek »

aluigi wrote:Decompressed what file? How? With what tool?

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

Re: how to compress file? (zlib compression) [FTS 15]

Post by aluigi »

Ok it's just compressed without any format or additional field so you can compress it with packzip or with the following script:

Code: Select all

comtype zlib_compress
get SIZE asize
get NAME filename
string NAME + ".compressed"
clog NAME 0 SIZE SIZE
Skoczek
Posts: 37
Joined: Wed Aug 25, 2021 10:10 pm

Re: how to compress file? (zlib compression) [FTS 15]

Post by Skoczek »

aluigi wrote:Ok it's just compressed without any format or additional field so you can compress it with packzip or with the following script:

Code: Select all

comtype zlib_compress
get SIZE asize
get NAME filename
string NAME + ".compressed"
clog NAME 0 SIZE SIZE

I dragged edited file on packzip.exe and nothings happens. What I am doing wrong?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: how to compress file? (zlib compression) [FTS 15]

Post by aluigi »

packzip must be used from command-line because it needs two arguments: input and output file.
Output file must not exist or it will be overwritten instead of being recreated.

I suggest to use the script.