User Tools

Site Tools


stunt_racer_64:compression

This is an old revision of the document!


Compression

Compressed files in Stunt Racer 64 begin with the following header structure:

struct CompressedFileHeader
{
    /*0x00*/ u32 srcSize; // total source size
    /*0x04*/ u32 dstSize; // total destination size
};

After the header are contiguous zlib-compressed chunks, each preceded by a subheader containing the destination size of the chunk:

struct CompressedChunkHeader
{
    /*0x00*/ u32 chunkDstSize;
    /*0x04*/ u8  compressedData[]; // 78 DA ...
};

The file and chunk headers are aligned to 2 byte boundaries in ROM.

stunt_racer_64/compression.1580095349.txt.gz · Last modified: 2020/01/27 03:22 by shygoo