Skip to content

.cats File Format

.cats ((c)atharsis (a)rchive (t)ool (s)tructure) is our custom file format to store resourcepacks a bit more efficiently than a simple zip file and loading it faster.

File Format Repo - Pack Squash Tool - Pack Squash Website

Publishing to Modrinth

Since Modrinth only allows .zip files to be uploaded, you can put the .cats file inside a .zip file and naming the zip <>.cats.zipwhen publishing to Modrinth. You can also add pack.mcmeta and the icon alongside the .cats in the zip which appear when catharsis isn't installed, the pack.mcmeta and the icon inside the .cats get prioritized.

YourPack.cats.zip
├── YourPack.cats
│   ├── pack.png      # Shows when catharsis is installed
│   └── pack.mcmeta   # Shows when catharsis is installed
├── pack.png          # Shows when catharsis is NOT installed, shows in the Modrinth/Prism Launcher
└── pack.mcmeta       # Shows when catharsis is NOT installed, shows in the Modrinth/Prism Launcher

Format

FieldTypeDescription
HeaderHeaderThe file header
DataByte[]The raw data of files/directories
FieldTypeDescription
Magic NumberIntAlways 0x43415453 = "CATS"
VersionUByteVersion (currently 0x01)
Root DirectoryDirectoryThe root directory

Directory

FieldTypeDescription
Entry CountUShortNumber of entries in the directory
EntriesEntry[]Array of entries

File

FieldTypeDescription
OffsetIntOffset from the header to data
SizeIntSize of the file data
CompressionUByteCompression type (0xFF = None, 0xFE = GZIP)

Entry

FieldTypeDescription
Entry TypeUByteType of entry (0x00 = File, 0x01 = Directory)
Name LengthUByteLength of the name string
NameUByte[]ASCII name of the entry, Only 0x21-0x7E excluding / and \ are allowed.
Entry DataDirectory or FileData specific to the entry type

From...