SCZ 1.6 review

by on

SCZ application is a simple set of compression routines for compressing and decompressing arbitrary data

License: LGPL (GNU Lesser General Public License)
File size: 0K
Developer: Carl Kindman
0 stars award from

SCZ application is a simple set of compression routines for compressing and decompressing arbitrary data. The initial set of routines implement new lossless compression algorithms. Restoration (decompression) is perfect. It is called SCZ, for simple compression format. SCZ is intended as a subroutine for incorporation within your own applications without legal or technical encumberances. It was developed because the standard compression routines, such as gzip, Zlib, etc., are fairly large, complex, and difficult to integrate-with, maintain, or understand.

SCZ is intended to fill a nitch: simple lightweight data-compress/decompress routines that can be included within other applications, and that permit the applications to compress or decompress data on-the-fly, during read-in or write-out with a simple call. This nitch applies to you, if the existing compression libraries are larger and more complex than your applications themselves. Other compression utilities do not appear to be intended for embedding within other applications.

SCZ typically achieves 3:1 compression. On binary PPM image files it often achieves a 10:1 compression. On some text files, I have seen 25:1. On difficult files, it may achieve roughly 2:1 reduction. Although zip and gzip usually achieve slightly higher ratios, SCZ makes tradeoffs for simplicity, memory footprint, and runtime speed, - in that order -, with note to diminishing returns.

For example, when compresing a particular 10-MB file, gzip saved 8.2-MB, while SCZ saved 7.8-MB. Either way, that's a lot of space saved! Sure, we could go after that last 0.4-MB of compression, but that is where diminishing returns sets in. To compress that extra bit would more than double the complexity and runtime of SCZ. SCZ's core compression and decomp routines are only 178 and 45 lines of code, respectively. The balance of the files provide convenient access methods for files and buffers. (In contrast, the light-weight and very commendable zlib has 3,360 source lines in 25 files.)

Although the scz routines are intended for compiling (or linking) into your own applications, the package includes two self-contained application programs that can be used as stand-alone compress/decompress utilities:

* Readme.txt - Info.
* scz.h - Common header file.
* scz_compress_lib.c - Base compression functions.
* scz_decompress_lib.c - Base decompression functions.
* scz_streams.c - Convenience routines for stream-like access.
* scz_compress.c - Application program to compress files.
* scz_decompress.c - Application program to decompresses files.

The application programs work similar to gzip and gunzip. See the header comments. The application utilities also serve as examples for how to call the scz compression routines from your own applications, and are useful for testing and validation.

To use the scz routines in your programs, just include or link to the lib file(s). You can use SCZ either as command-line utilities or as the raw routines.

See How It Works for information about the SCZ architecture and file format. You should find the SCZ commenting and code structures somewhat understandable.

The SCZ routines work interchangably across all platforms. This makes portable and self-contained compression available to all applications.

In the future, I would like to add a similar set of simple routines for lossy compression of specific kinds of data, such as images or audio files.

What's New in This Release:
Some memory leaks and freeing issues were cleaned up.
A potential bug in the streams-compress function was fixed.
Compression speed was improved.
The header file was reorganized with prototypes for convenient linking into applications.
The SCZ compression format remains stable, and the latest version passes all regression tests.

SCZ 1.6 keywords