Page 1 of 1
Command and Conquer 3 - TGA files
Posted: Sun Mar 11, 2007 2:20 pm
by Mr.Mouse
Ok, so I downloaded the C&C3 demo and opened the *.BIG archives as "Lord of the Rings: BFME" BIG files in MultiEx Commander.
I noticed some TGA files in there, but they don't show in Photoshop and others.
I've attached two of them, perhaps someone can take a look.

Posted: Sun Mar 11, 2007 6:12 pm
by Savage
Well the two files are identicals, have the same code, and the same of you i can't open the tga files
Posted: Sun Mar 11, 2007 11:00 pm
by john_doe
The files are compressed, like almost all files from these BIG files.
I don't know the compression method uses but suspect it could be the "default" Westwood compression (usually called something like codec80).
Posted: Mon Mar 12, 2007 12:44 am
by Savage
I read the data are compressed with RefPAck, the unpacker BigEditor Beta 0.5 comes with this unpacker
Why not try to extract the data with this Big file unpacker?
(...)is credited for his RefPack Decompression code used in the program(...)
Info about it:
http://www.ppmsite.com/forum/viewtopic.php?t=14272
Unpacker:
http://www.ppmsite.com/downloads/BIGEditorBeta05.zip
Posted: Mon Mar 12, 2007 10:07 am
by Mr.Mouse
Yes, well, of course, in my case, I wish to KNOW what's going on, instead of using someone else's tool. If I ever want to implement new decompression routines in MultiEx Commander, I must know what the compression method is.
In any event, your tips pointed me in the right direction and I attach a tool by Jonwil, including source code. The tool seems to decompress the TGA files file.
Note that the code has been adapted by Mad Ivan so it could actually run. See for reference:
http://www.derelictstudios.net/forums/i ... 52&t=15016
Below the tool with source code to decompress!
Posted: Mon Mar 12, 2007 11:24 am
by Savage
Thanks i found the unpacker too, but the zip whas CRC error, so i posted the big unpacker, with comes with the source
The decompress works great

Posted: Tue Mar 20, 2007 5:01 pm
by Rheini
I wonder if there is any good documentation of this compression. Don't want to go through all that code.
Posted: Wed Mar 21, 2007 11:48 am
by Deniz Oezmen
Rheini wrote:I wonder if there is any good documentation of this compression.
I do not think that thic method can be documented very well (except reducing the give source code to pseudo code) due to the high usage of flag bits. This is most probably a self-constructed scheme, though the main idea is yet again "find references in past data". It is interesting, though, that the designers have combined back references and literal copying in the handling of most opcode sequences. I have not seen that before ...