READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Commandos Strike Force

Old posts about game archives and other formats.
ENV
ultra-n00b
Posts: 5
Joined: Wed Mar 22, 2006 3:25 pm

Post by ENV » Wed Mar 22, 2006 6:09 pm

hmm I think ive got enough to extract the non compressed file now...

Any ideas on the type of compression used on the others?

ENV
ultra-n00b
Posts: 5
Joined: Wed Mar 22, 2006 3:25 pm

Post by ENV » Mon Mar 27, 2006 9:38 am

:(

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Post by Savage » Wed Aug 16, 2006 11:55 pm

Well GAUP looks can unpack the .PAK, i dont' have a sample or similar to try...so..if somebody have the game to test...8D

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

Post by Anatoly Prokofiev » Tue Oct 31, 2006 2:35 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.

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Post by Mr.Mouse » Sat Nov 04, 2006 3:08 pm

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;
This will enable full extraction from the 'A' type PAK files.

Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

Post by Rheini » Tue Feb 27, 2007 5:43 pm

Anatoly Prokofiev wrote:The type of compression, used in PAK files, is a simple Deflate.
as always :zzz:
Today I managed to decompile (AND recompile) all PAK files from the game.
So you wrote a tool? Will you release it?

Anatoly Prokofiev
ultra-n00b
Posts: 2
Joined: Tue Oct 31, 2006 12:42 pm

Post by Anatoly Prokofiev » Fri Apr 06, 2007 12:04 pm

Wow. I almost forgot about this topic... :)
So you wrote a tool? Will you release it?
No, what's the point? It was a very simple tool - no GUI, no options.
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
VVIP member
Posts: 688
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Post by Darkfox » Sat Apr 07, 2007 10:41 am

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.

Post Reply