Home

Awesome

salvador -- a fast, near-optimal compressor for the ZX0 format

salvador is a command-line tool and a library that compresses bitstreams in the ZX0 format.

The tool outputs compressed files that are within 0.02% on average, of the files produced by the zx0 packer itself. The compressor is, however, several orders of magnitude faster, with compression speed similar to apultra.

The compressor can pack files of any size, however, due to the 31.5 KB window size, files larger than 128-256 KB will get a better ratio with apultra. This will not be an issue when compressing for the main target, 8-bit micros. By default, salvador compresses for the modern (V2) format. The classic, legacy format is also supported; use the -classic flag on the command line.

salvador is written in portable C. It is fully open-source under a liberal license. You can use the ZX0 decompression libraries for your target environment. As with LZSA and apultra, you can do whatever you like with it.

The output is fully compatible with the ZX0 compressor by Einar Saukas.

Check out Dali by Bitbreaker, that uses Salvador to compress for the C64, including self, in-place decompression and proper handling of load-addresses. The tool is part of the Bitfire C64 loading system.

Included 8-bit decompression code:

External decompression code:

License: