FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   oodle chunk (de)compressor - oodle64chcmp (https://fileforums.com/showthread.php?t=101683)

elit 31-03-2018 12:15

oodle chunk (de)compressor - oodle64chcmp
 
3 Attachment(s)
Here is a chunk (de)compressor for quickbms's dumped files packed with oodle. This is based on Ramiro Cruzo's noodle, big thanks to Ramiro for sources.

This program is intended to pack files(chunks) that were previously dumped with quickbms and decompressed(possibly also with this tool). This is NOT general purpose compressor for FA as noodle, it is designed for game repacking only.

Oodle64chcmp does not write any header(or tail) during compression except for optional uncompressed size that is injected at the beginning of file, which can be specified as either 4 or 8 byte(32/64bit). You are then supposed to "log" such compressed chunks back into game's data file using quickbms.

For decompression, uncompressed size header must be present(and its proper width selected during decompression or it will fail) following raw compressed chunk data(and nothing more). You are supposed to dump such files (again) using quickbms. Basically this is FGpack.exe/fgnoodle.exe with ability to also decompress and extra options to select width of size header.

I also included example .bms file for XCOM2 WotCh which can be used to dump such raw file chunks or log them back. Keep in mind that script is highly experimental and only for tutorial purpose. Although it should work with .upk files correctly, .tfc's for sure dont work 100% yet. And it was tested only on very few files. I also am not 100% sure yet about certain direction of this, at least in .tfc's some chunks were multi-layered. What I mean is normally you should get chunk offset with its preceding size header but in one tfc file sometimes I got multi-size header followed by multi continuous chunks. I am not sure if the solution should be to dump each as individual file through BMS or if its supposed to go through oodle all together. Thats why I am releasing it already as next stage is uncertain in time.

Finally, unlike fgpack or noodle, I was not able to reproduce output from dll into program. When you try to decompress the chunk with fgnoodle exe for example, even though it doesnt work it still output important info into console, such as parameters that were used during compression originally. This is very important information to have when re-compressing back. I spent whole day figuring out but was unable to do it(in std 'C' using mingw). If anyone have an idea, including code example, please let me know. Dll is outputting important info but I am unable to see/capture it in console window yet. Other than that, this tool should work as expected. I also included fgnoodle file that you can use to see such info during decompression(it can only read 8 byte header size).

Finally, this is for advanced repackers and people who understand all this. If you have no idea at this point what I was talking about, its not for you and you can safely skip this.

Attachment 21561
Attachment 21562
Attachment 21563

elit 02-04-2018 11:13

2 Attachment(s)
I re-formated error messages and did some cleanup in messaging output overall, functionally no difference. Now also if (de)compression fail it will report file name whose failed.

PS: as for that "direction" I was speaking about, I now tested and can confirm this is correct way of doing things. You are supposed to dump layered chunks as individual files with uncompressed size of each attached, it is not job of compressor to handle it. Therefore this program is fine as it is. I was only not able to decompress very rare(rare as per 2 chunks of few kb size of 1.4GB file) number of chunks with flags like "\xCC\x.." or even "\x8C\x50" for which .dll threw error. "\x8C\x06" were all fine. Decmp function take plenty of params which I dont know about and use only default from noodle. If anyone know(well, I dont expect Chinese to help, right FG? :) ) let me know.

I also attached updated bms script that can now extract chunks from .tfc file(most of it like 99.9%) and with other cleanup to give you idea how to handle such layers.

Attachment 21570
Attachment 21569

FitGirl 02-04-2018 11:27

Quote:

Originally Posted by elit (Post 469837)
I dont expect Chinese to help, right FG? :)

Chinese is something new...

elit 02-04-2018 17:34

Quote:

Originally Posted by FitGirl (Post 469839)
Chinese is something new...

Ah, but at least you came, приветственная девушка!

PS:(was only joking of course)

elit 03-04-2018 06:07

1 Attachment(s)
And in conjunction to this tool, I am now also working on this:
Attachment 21583
This will be very useful for quickbms dumps in general. I will post it in its own thread when its done.

PsYcHo_RaGE 10-05-2018 22:29

Hmmmm:rolleyes: This is something new alright i am on it

its divsome :cool:

chunk works great;)


All times are GMT -7. The time now is 02:42.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com