Add CatSystem2 .zt extension archive format (CatSystem2 pack file).
I wasn't sure what the best course of action for the copyright on a new file was - so the date/time/name info has been filled in, while retaining the copyright to morkt. :)
New Format: ZT/PACK
Usage: Extras/export pack files for CatSystem2 - often used to save wallpapers, wav files, or other extras to the user's computer.
Tag:ZT/PACK (chosen over justZT, based on the devkit tool name: ztpack.exe, which also describes it as a "pack file").
Extension:*.zt (found in export.int archive).
Signature: No file signature of any kind, immediately starts with an entry structure. A lot of sanity checks have been added.
Hierarchic: Yes, although this is rarely used, and CS2's implementation is rather buggy.
The specification at least, is still well defined.
Archive layout is the standard offset-next approach seen in other CS2 formats. But there's two offset-next fields: One for subdirectory entries, and one for the next flat (current) directory entry.
Folders have their own entries, which are what point to child file entries.
About fields referenced
The following entry structure is all that exists for the .zt format. It appears at the beginning of the file, and at every following offset.
Note that when UnpackedSize == 0, CS2 takes liberties to skip attempting decompression altogether. However the Size field is still specified, and the minimal Zlib compression RFC header and data is present.
Entry structure fields referenced
### Entry Structure
|Type |Value |Description|
|-----------:|:-----------|:----------|
|`uint32` |OffsetNext |Offset to the next entry in current directory (relative to this entry)|
|`uint32` |OffsetChild |Offset to first child entry of this folder (relative to this entry)|
|`uint32` |EntryLength |Remaining entry length (after this field)|
| | | |
|`uint32` |Attributes |`0` = File, `1` = Folder|
|`char[260]` |FileName |Base file name (no parent directory names)|
|`uint32` |Size |Compressed size of FileData|
|`uint32` |UnpackedSize|Decompressed size of FileData|
|`byte[Size]`|FileData |Zlib-compressed file data|
Add CatSystem2
.zt
extension archive format (CatSystem2 pack file).I wasn't sure what the best course of action for the copyright on a new file was - so the date/time/name info has been filled in, while retaining the copyright to morkt. :)
New Format: ZT/PACK
ZT/PACK
(chosen over justZT
, based on the devkit tool name:ztpack.exe
, which also describes it as a "pack file").*.zt
(found inexport.int
archive).About fields referenced
The following entry structure is all that exists for the
.zt
format. It appears at the beginning of the file, and at every following offset.Note that when
UnpackedSize == 0
, CS2 takes liberties to skip attempting decompression altogether. However theSize
field is still specified, and the minimal Zlib compression RFC header and data is present.Entry structure fields referenced
### Entry Structure |Type |Value |Description| |-----------:|:-----------|:----------| |`uint32` |OffsetNext |Offset to the next entry in current directory (relative to this entry)| |`uint32` |OffsetChild |Offset to first child entry of this folder (relative to this entry)| |`uint32` |EntryLength |Remaining entry length (after this field)| | | | | |`uint32` |Attributes |`0` = File, `1` = Folder| |`char[260]` |FileName |Base file name (no parent directory names)| |`uint32` |Size |Compressed size of FileData| |`uint32` |UnpackedSize|Decompressed size of FileData| |`byte[Size]`|FileData |Zlib-compressed file data|Additional references