QuickLZ 1.40 beta test website
Precompiled executables
Please download qpress from the front page.
Help beta testing 1.40
If you have some spare CPU cycles you can help beta testing version 1.40 with our automated test tools. Sources and perl build scripts are included, and they are portable, but only Windows is supported here.
The tools are testing following:
Bounds checking with hardware watchpoints to detect read/write access beyond scratch_compress, scratch_decompress, source buffers and destination buffers for compression and decompression.
qlz_size_compressed() <= qlz_size_decompressed() + 400, qlz_size_compressed() = qlz_compress(), and qlz_size_decompressed() = qlz_decompress().
Verifies that decompressed data equals original data
Some programming bugs may execute often but go undetected because their execution do not always propagate to become visible. For example, a hash table entry may get corrupted but by chance become overwritten with valid data again before its being used. The test tools validate some of these internal data structures.
One test tool is inmem.zip which takes a file as argument and repeatedly selects a random offset and length to compress and validate, until a total of 1 GB has been compressed. The zip file contains 108 executables compiled with different configurations of the flags described in the manual. You can execute them all one by one with inmem.bat:
inmem.bat d:\largefile.xml
Another test tool is diskfiles.zip which will compress and validate all files in a user given directory, recursively. It takes part in-memory and doesn't use disk space or much memory. You can execute them all one by one with diskfiles.bat:
diskfiles.bat d:\
All executables are running in IDLE_PRIORITY_CLASS so that they can run in the background without disturbing too much. They can take hours or days to complete but you can cancel them any time.
In case of detected errors, crash or freeze, please note the executable filename, the data file which caused the error and other information printed on screen and contact lar@quicklz.com.
Changes since 1.30
The new level 2 is compressing at twice the speed of old level 3 while having the same compression ratio, on the cost of decompression speed. Improved level 3 compression ratio slightly, at the cost of compression speed. Removed old level 1 and 2.
Overlapping decompression supported to save memory.
All backwards compatibility has been lost due to optimizations in the algorithm and data format.
The need for test_rle and speedup_incompressible flags has been optimized away. In version 1.30 the flags would enable detection of repeated sequences of the same byte and incompressible areas and special threat them. In version 1.40 both things are enabled permanently because methods have been developed that do not decrease performance for kinds of data where they are not needed. The new methods are at the same time much simpler and more elegant than in version 1.30.
General code cleanup and simplifications. Version 1.40 has a total line count (.h header + .c source) of 882 compared to 942 for version 1.30. Not all software is affected by code growth :-)
Removed the initial time overhead of qlz_compress() in the old level 0. In version 1.30 this time delay existed when not in streaming mode and was due to initialization of a 16/32 Kbyte table on 32/64-bit architectures (equivalent to the time it would take compressing around 1-2 Kbytes).
The library is now shipped as separate source file and header file and with QLZ_ or qlz_ prefixes on all publics.
C version
| Download | quicklz.c, quicklz.h | |||||||||||||||||||||||||||
| Manual | manual.html | |||||||||||||||||||||||||||
| Sample code | compress_file.c, decompress_file.c, stream_compress.c, stream_decompress.c | |||||||||||||||||||||||||||
| Changelog |
|
Precompiled DLLs
| DLLs | 140dll.zip |
| C# demo | csharp.zip |
| Visual Basic 6 demo | vb6.zip |
| PowerBASIC demo | powerbasic.zip |
| Changelog | Always latest C version compiled into DLLs |
This is the C version compiled into DLLs. Some languages or wrappers may perform memory allocation or conversion on input and output data which adds some time overhead.
The DLLs are compiled with each their setting of the QLZ_COMPRESSION_LEVEL, QLZ_STREAMING_BUFFER and QLZ_MEMROY_SAFE flags:
The filename prefix "32" or "64" tells if it's compiled for 32-bit x86 Windows or 64-bit x64 Windows. The 32-bit DLLs are using the stdcall calling convention. The 64-bit DLLs are using the new x64 convention which is the only convention existing in Windows x64 and thus replaces both stdcall, cdecl and fastcall.
The next filename prefix "1", "2" or "3" tells the compression level.
If the filename contains "1000000" then QLZ_STREAMING_BUFFER = 1000000 (streaming mode enabled), otherwise QLZ_STREAMING_BUFFER = 0 (streaming mode disabled).
If the filename contains "safe", then QLZ_MEMORY_SAFE is defined (memory safe decompression enabled), otherwise it's not defined (memory safe decompression disabled).
Please see the manual for the C version for descriptions of these flags. Remember that data must be decompressed with the same setting of QLZ_COMPRESSION_LEVEL and QLZ_STREAMING_BUFFER as it was compressed.
QuickLZ Sharp
| Download | QuickLZ.cs | ||||||
| Changelog |
|
This is a native C# version with no unsafe code. Compression and decompression is roughly half as fast as the C and DLL versions.
Only a subset of the library has been ported, namely the setting QLZ_COMPRESSION_LEVEL = 1 and QLZ_STREAMING_BUFFER = 0 (compression level 1 and streaming mode disabled). Data compressed with QuickLZ Sharp can be decompressed by both the C and DLL versions and vice versa, prodivded that they are using these settings.
QuickLZ Sharp is also not using the QLZ_MEMORY_SAFE flag, so decompression may crash if fed with corrputed data. Because C# is managed you can place decompression in a try...catch block instead.
Usage is so simple it hardly needs description. Just call the functions byte[] compress(byte[] src) and byte [] decompress(byte[] src).
QuickLZ Java
| Download | QuickLZ.java | ||||||
| Changelog |
|
This is a native Java port. Its description is exactly the same as for the C# version above.