Offzip reimported difference
-
- Posts: 2
- Joined: Thu May 23, 2019 12:14 pm
Offzip reimported difference
I'm trying to debug a problem where the game I'm trying to mod is crashing when it loads. So I thought I would try to extract the file I want to edit and then reimport it with no changes to see if its a problem with the way offzip is rebuilding the file.
My question is.. If I reimport the same file with no changes should it look the same as the original in the pack2 file?
I'm not sure if CRC checking is going on or there is a problem with the data structure of the file when its loading.
My question is.. If I reimport the same file with no changes should it look the same as the original in the pack2 file?
I'm not sure if CRC checking is going on or there is a problem with the data structure of the file when its loading.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Offzip reimported difference
It's all normal because different implementations of the zlib algorithm (header+deflate+crc) and even different versions of the same library produce different outputs.
-
- Posts: 2
- Joined: Thu May 23, 2019 12:14 pm
Re: Offzip reimported difference
Ok,I also notices Looking at the zLib headers the original us using 78 DA (Best compression) and Offzip imported with 78 01 (No compression/Low)
is there a way to set that via command line in offzip, packzip, etc?
is there a way to set that via command line in offzip, packzip, etc?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Offzip reimported difference
No, that field is not related to the compression level. It's the FCHECK field:
All my tools use the best compression level and settings.
packzip allows to set the mode with the -m option:
Code: Select all
CM CINFO FCHECK FDICT FLEVEL
zopfli 8 7 1 0 1
advancecomp 8 7 26 0 1
uberflate 8 7 1 0 1
All my tools use the best compression level and settings.
packzip allows to set the mode with the -m option:
Code: Select all
-m MODE mode:
zlib/deflate
0 default strategy
1 filtered
2 huffman only
3 rle
4 fixed
-
- Posts: 12
- Joined: Fri Nov 30, 2018 8:46 pm
Re: Offzip reimported difference
hi
aluigi, do you have an example for the -m option in packzip...
i tried packzip.exe -m 2 -o 0x00000000 00000000.dat archive file but it failed (error wrong argument)...
if i use this argument only -o 0x00..... it works but i got same problem than this subject...so file is not readable in the game...
Any idea?
thx
aluigi, do you have an example for the -m option in packzip...
i tried packzip.exe -m 2 -o 0x00000000 00000000.dat archive file but it failed (error wrong argument)...
if i use this argument only -o 0x00..... it works but i got same problem than this subject...so file is not readable in the game...
Any idea?
thx
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Offzip reimported difference
you didn't specify the output file:
Code: Select all
packzip.exe -m 2 -o 0x00000000 input_file output_file
-
- Posts: 36
- Joined: Wed Aug 31, 2016 6:12 pm
Re: Offzip reimported difference
Many files contain compressed and uncompressed files. It seems that offzip only detects, extracts and reimports compressed files and uncompressed files are totally ignored.
Is offzip capable to extract and reimport uncompressed files from and into another file?
If not, as I suppose is the case, which tool would help me do to it?
Is offzip capable to extract and reimport uncompressed files from and into another file?
If not, as I suppose is the case, which tool would help me do to it?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Offzip reimported difference
Data in files have a starting and ending point, offzip scans the compressed data in files for finding these two parameters and dumping the data.
Therefore it's impossible to dump uncompressed data because it can be anywhere.
You need to a tool/script correctly parsing that specific format (ask in Game Archive).
Therefore it's impossible to dump uncompressed data because it can be anywhere.
You need to a tool/script correctly parsing that specific format (ask in Game Archive).
-
- Posts: 36
- Joined: Wed Aug 31, 2016 6:12 pm
Re: Offzip reimported difference
Thanks for the information!