..
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Godfather 2 - help with .str files
Link expired
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Godfather 2 - help with .str files
There is already a topic about these files I guess:
viewtopic.php?t=1840
The str files are compressed with the RefPack algorithm:
The decompressed file has the LCH2 magic at the beginning.
Anyway already exist tools so find and use them.
viewtopic.php?t=1840
The str files are compressed with the RefPack algorithm:
Code: Select all
comtype dk2
goto 0x34
get SIZE long
goto 0x44
get ZSIZE long
savepos OFFSET
get NAME basename
clog NAME OFFSET ZSIZE SIZE
Anyway already exist tools so find and use them.
-
- Posts: 561
- Joined: Tue Oct 13, 2015 1:26 pm
Re: Godfather 2 - help with .str files
The packages could have many files and they are chunked, and not all chunks are always compressed, only when they have the "kapR" identificator. Something like this (Pascal):aluigi wrote:The str files are compressed with the RefPack algorithm:Code: Select all
comtype dk2
goto 0x34
get SIZE long
goto 0x44
get ZSIZE long
savepos OFFSET
get NAME basename
clog NAME OFFSET ZSIZE SIZE
Code: Select all
type
TDataChunk = packed record
Magic: Array[0 .. 3] of AnsiChar;
ZSize: UInt32;
ComType: Array[0 .. 3] of AnsiChar;
end;
type
TData = record
Magic: Array[0 .. 3] of AnsiChar;
HeaderSize: UInt32;
RDHS: Array[0 .. 3] of AnsiChar;
Unknown: Array[0 .. 27] of Byte;
DataSize: UInt32;
Chunks: TArray<TDataChunk>;
end;
type
TStr = record
Magic: Array[0 .. 3] of AnsiChar;
HeaderSize: UInt32;
Unknown: UInt32;
Files: TArray<TData>;
end;