Commandos Strike Force
- Savage
- VIP member

- Posts: 560
- Joined: Sun Apr 17, 2005 11:00 am
- Has thanked: 16 times
- Been thanked: 17 times
Well GAUP looks can unpack the .PAK, i dont' have a sample or similar to try...so..if somebody have the game to test...
http://wincmd.ru/plugring/gaup.html
* "Commandos Strike Force" .PAK files (Not decompress)
mm.. looks unpacker not decompressor
http://wincmd.ru/plugring/gaup.html
* "Commandos Strike Force" .PAK files (Not decompress)
mm.. looks unpacker not decompressor
-
Anatoly Prokofiev
- ultra-n00b
- Posts: 2
- Joined: Tue Oct 31, 2006 12:42 pm
The type of compression, used in PAK files, is a simple Deflate. ZLibEx library can handle such packed blocks with no problem. Each file in PAK archive is stored like this:
@[Real file offset from the main table]:
long PackedBlockSize
long UnpackedBlockSize
Here's a pseudocode to extract one file from _compressed_ PAK.
Get Real_File_Size from the main table
Seek to Real_File_Offset.
Repeat
Read PackedBlockSize
Read UnpackedBlockSize
Read Block
DecompressIt (i.e., using ZDecompress from ZLibEx)
WriteTo_Output
Real_File_Size = Real_File_Size - UnpackedBlockSize
until Real_File_Size<=0
That's all, I guess. Today I managed to decompile (AND recompile) all PAK files from the game. Remember to change "PAKC" header ID to "PAKA", if you want to produce an uncompressed PAK file.
@[Real file offset from the main table]:
long PackedBlockSize
long UnpackedBlockSize
Here's a pseudocode to extract one file from _compressed_ PAK.
Get Real_File_Size from the main table
Seek to Real_File_Offset.
Repeat
Read PackedBlockSize
Read UnpackedBlockSize
Read Block
DecompressIt (i.e., using ZDecompress from ZLibEx)
WriteTo_Output
Real_File_Size = Real_File_Size - UnpackedBlockSize
until Real_File_Size<=0
That's all, I guess. Today I managed to decompile (AND recompile) all PAK files from the game. Remember to change "PAKC" header ID to "PAKA", if you want to produce an uncompressed PAK file.
- Mr.Mouse
- Site Admin
- Posts: 4051
- Joined: Wed Jan 15, 2003 6:45 pm
- Location: Dungeons of Doom
- Has thanked: 421 times
- Been thanked: 575 times
- Contact:
Code: Select all
Get MW Long 0 ;
Get V1 Long 0 ;
Get V2 Long 0 ;
Get ResNum Long 0 ;
# First loop needed to just find the offset of the first file
SavePos ST 0 ;
For T = 1 To ResNum ;
Get FN String 0 ;
Get ROff Long 0 ;
Get Size Long 0 ;
Get V1 Long 0 ;
Get V2 Long 0 ;
Next T;
SavePos Offset 0 ;
GoTo ST 0 ;
For T = 1 To ResNum ;
Get FN String 0 ;
Get ROff Long 0 ;
Get Size Long 0 ;
Get V1 Long 0 ;
Get V2 Long 0 ;
Math ROff += Offset ;
Log FN ROff Size 0 0 ;
Next T;-
Anatoly Prokofiev
- ultra-n00b
- Posts: 2
- Joined: Tue Oct 31, 2006 12:42 pm
Wow. I almost forgot about this topic... 
But there is also a good news. I sent a letter to creator of GAUP with a brief description of how to unpack this files. Look at this:
0.4.9.0 PRO (02/11/2006)
Добавлена полная распаковка of Commandos Strike Force .PAK файлов (спасибо Анатолию Прокофьеву).
Added full extraction of Commandos Strike Force .PAK files (thanks to Anatoly Prokofiev).
So, enjoy!
No, what's the point? It was a very simple tool - no GUI, no options.So you wrote a tool? Will you release it?
But there is also a good news. I sent a letter to creator of GAUP with a brief description of how to unpack this files. Look at this:
0.4.9.0 PRO (02/11/2006)
Добавлена полная распаковка of Commandos Strike Force .PAK файлов (спасибо Анатолию Прокофьеву).
Added full extraction of Commandos Strike Force .PAK files (thanks to Anatoly Prokofiev).
So, enjoy!
-
Darkfox
- VVIP member

- Posts: 688
- Joined: Fri Jul 04, 2003 6:11 pm
- Has thanked: 33 times
- Been thanked: 16 times
Hmmmm... the big question at this point is if the game recognises the decompressed files or if recompiling the PAK file is relatively simple. Since the compression is simply deflate it seems it would be a simple process to recompress and remake the archive and it would be playable?
I don't own the game myself but it seems that this could be tested perhaps? It is important how easily decompression and recompiling is in relation to if the game would recognise it afterwards... that is, to test that hypothesis for a clear answer if I have to find some way to do so myself.
I don't own the game myself but it seems that this could be tested perhaps? It is important how easily decompression and recompiling is in relation to if the game would recognise it afterwards... that is, to test that hypothesis for a clear answer if I have to find some way to do so myself.

