[Scummvm-devel] GZip savegames

Marcus Comstedt marcus at mc.pp.se
Mon Dec 1 11:25:02 CET 2003


Max Horn <max at quendi.de> writes:

> Yo,
>
> as you may have noticed, I recently commited code which allows for
> storing savegames compressed. Engines which use SaveFileManager (and
> all engines should do that... I hope all do it, indeed :-) get the
> ability for free. All you have to do is to define USE_ZLIB when
> compiling ScummVM (and of course you need to have zlib, and link
> against it, i.e. on Unix add a -lz). Old uncompressed savegames can
> still be loaded. New savegames (for scumm) are typically reduced by a
> factor 2-7 in my tests.

Is the compressed format compatible with the one already in use by the
Dreamcast backend, so that I can remove my own compression code?
(On DC, compressed saves contain a raw zlib stream with the regular
 save data, no headers in the encapsulation apart from the zlib one.
 Uncompressed games are recognized by the fact that they start with
 'S' for "SCVM" rather than with a zlib header.)


> * going "back" wouldn't be a problem: if you want to send a compressed
> * savegame to somebody with a ScummVM w/o compression support, just
> * use "gunzip" to decompress the savegame

Ok, I guess not...  The header used by gzip/gunzip is different from
the one used by zlib.


  // Marcus






More information about the Scummvm-devel mailing list