ZenHAX
http://zenhax.com/

QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
http://zenhax.com/viewtopic.php?f=13&t=556
Page 14 of 14

Author:  aluigi [ Sun Mar 18, 2018 10:45 pm ]
Post subject:  Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Use the latest version of quickbms and then use reimport2.bat.
This new method has some limitations too, it depends by the format of the archive.

Author:  minhvipkk [ Mon Mar 19, 2018 5:05 pm ]
Post subject:  Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

aluigi wrote:
Use the latest version of quickbms and then use reimport2.bat.
This new method has some limitations too, it depends by the format of the archive.


The archive file is data.win. The file including parts for translation is STRG.txt.
Reimport2 doesn't allow to import bigger size file. :(

Author:  BCGhost [ Sat Apr 14, 2018 7:32 am ]
Post subject:  Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

The tool threw me an error when I tried to decompress this data chunk with zlib:
Attachment:
zlib.rar [6.29 KiB]
Downloaded 8 times

while I can decompress it without problems through HexEdit.

Author:  aluigi [ Sat Apr 14, 2018 2:57 pm ]
Post subject:  Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

It works perfectly, remember that if you use "comtype zlib" you have also give a decompressed size value which is same/bigger than the real decompressed size, only zlib_noerror and unzip_dynamic do the job automatically:
Code:
comtype zlib_noerror # or unzip_dynamic
get SIZE asize
clog "" 0 SIZE SIZE

Author:  BCGhost [ Sat Apr 14, 2018 3:24 pm ]
Post subject:  Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

I actually did specified an unzip size but it still gave me the error saying
"Error: the compressed zlib/deflate input is wrong or incomplete (-5)".

This is the code I'm using for the simple test:
Code:
comtype zlib
get Name basename
string Name + ".dcp"
get ZSize asize
set Size long ZSize
math Size * 20
clog Name 0 ZSize Size

However zlib_noerror does work though.

Author:  aluigi [ Sat Apr 14, 2018 3:58 pm ]
Post subject:  Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Your script is correct but your dump is incomplete so the zlib library returns an error if the input is not perfect, in fact the zlib format has a crc at the end to check the input.
zlib_noerror simply ignores these errors and doesn't consider the decompressed size.

Author:  BCGhost [ Sat Apr 14, 2018 4:16 pm ]
Post subject:  Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

aluigi wrote:
in fact the zlib format has a crc at the end to check the input.

I never knew that before. That will make sense. The file I'm dealing with has no fields about the compressed size or unzip size while HexEdit will crash if I decompress the whole compressed chunk directly, so I have to perform a decompression on every piece of data splitted by the zlib magic "\x78\x01" in this case. Guess I'd have to use the noerror method then.

Author:  aluigi [ Sun Apr 15, 2018 4:46 am ]
Post subject:  Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

or you can just use offzip on the whole data/memory and it will do the job for you automatically, it's just its primary purpose :)
http://aluigi.altervista.org/mytoolz.htm#offzip

Author:  BCGhost [ Tue Apr 17, 2018 2:08 am ]
Post subject:  Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

I was wondering if it would perform a complete decompression either method.

Page 14 of 14 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/