MCPKUtil Wiki
Java library for manipulating the MCPK archives used by CitiesXL
Brought to you by:
mutantplatypus
MCPK Format Specification
A lot of the content for CitiesXL is compressed into archives (CXLRA, for CitiesXL Resource Archives). Here is what is known about the format:
The following is a description of the file format/encoding used in the CitiesXL resource archives (.pak and .patch files, among others). I had a really hard time finding this information in English. I figured this would be as good a place as any to post an English version. Big thanks to the people at Xentax Forum for most of the initial work in reverse engineering the format, and to Arcadoli at Generation-City.com for sending me a pretty neat document describing the format in French.
.pak
, .patch
,
.sgbin
, .land
, .sav
, or .ava
int
s are 4 bytes and little-endian0x30
bytes0x4D43504B
MCPK
"version
, int
build
, int
sha1Hash
, 20 bytes0x30
(inclusive) to the end of this file, including encrypted file tablefileTableAddress
, int
fileCount
, int
0x30
(inclusive) to
fileTableAddress
(exclusive)compressedSize
, int
size
, int
address
, int
sha1Hash
, 20 bytescompression
, int
0x00000100
. Some files, such a small text files and most PNG files, are actually larger when deflated for storage in a CXLRA. A few are even the same size. Always check these bits to determine if the file needs to be inflated with zlib.nameLength
, int
name
, variable size