SAV files

Description

This is another simple archive format; unlike BIFF files, though, this is a standalone format, and employs compression. Moreover, it is written in such a way as to make incremental additions easy and quick. It employs the compression of zlib, written by Jean-loup Gailly and Mark Adler.

SAV file versions

SAV V1

Overall structure

Included here is a quick-n-dirty C program, using zlib, to extract the components of a SAV file to their original filenames. A program to do the opposite is left as an exercise for the reader. un_sav.c

SAV V1 Header

OffsetSize (datatype)Description
0x00004 (char array)Signature ('SAV ')
0x00044 (char array)Version ('V1 ')

SAV V1 Files

The entries each represent one file, in its modified state, typically AREA and STOR files. They are merely concatenated. In order to seek a particular file, you read the header of the current section (i.e. all except the raw data in the below table). If the filename is the one you are looking for, decompress the section. Otherwise, skip the file stream ahead by "compressed data length" bytes and repeat.

OffsetSize (datatype)Description
0x00004 (dword)Length of filename
0x0004variable (ASCIIZ char array)Filename (length specified by previous field)
sizeof(filename)+0x00044 (dword)uncompressed data length
sizeof(filename)+0x00084 (dword)compressed data length
sizeof(filename)+0x000cvariable (raw data)compressed data (length in bytes specified by previous field)

[ back to index ]