Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Artifact ID: | 9bb2561a09ff57702c43839516e187df9ce7ab63 |
---|---|
Page Name: | benchmarks (2019 update) |
Date: | 2019-02-06 12:30:41 |
Original User: | sandro |
Next | aa614b33e594fe6404bf3a72007776ad281a2a38 |
Content
Back to RasterLite2 doc index
RasterLite2 reference Benchmarks (2019 update)
Intended scopes
In recent years new and innovative lossless compression algorithms have been developed.The current benchmark is intended to check and verify by practical testing how these new compression methods do practically perform under the most usual conditions.
More specifically, a comparison will be made between the relative performances of new and older lossless compression methods.
The contenders
The following general purpose lossless compression methods will be systematically compared:- DEFLATE: (aka Zip)
This is the most classic and almost universally adopted lossless compression method.
It was initially introduced about 30 years ago (in 1991), so it can be assumed to be the venerable decane of all them. - LZMA: (aka 7-Zip)
This is a well known and widely adopted lossless compression method.
It's younger than DEFLATE having been introduced about 20 years ago (in 1998). LZMA is an extremist interpretation of loassless compression.
It's usually able to achieve really impressive compression ratios (by far better than DEFLATE can do), but at the cost of severely sacrifycing the compression speed; LZMA can be easily deadly slow. - LZ4
This is a more modern algorithm having been introduced less than 10 years ago (in 2011), so it's diffusion and adoption is still rather limited.
LZ4 too is an extremist interpretation of lossless compression, but it goes exactely in the opposite direction of LZMA.
It's strongly optimized so to be extremely fast, but at the cost of sacrifycing the compression ratios. - ZSTD (aka Zstandard)
This is a very recently introduced algorithm (2015), and it's adoption is still rather limited.
Curiosly enough, both LZ4 and ZSTD are developed and maintained by the same author (Yann Collet).
ZSTD is a well balenced algorithm pretending to be a most modern replacement for DEFLATE, being able to be faster and/or to achieve better compression ratios.
Just few technical details about the most relevant innovations introduced by ZSTD:- The old DEFLATE was designed so to require a very limited amount of memory, and this impaired someway it's efficiency.
Modern HW can easily support a lot of memory, so ZSTD borrows few ideas from LZMA about a less constrained and more efficient memory usage.
More specifically, DEFLATE is based on a moving data window of only 32KB; both LZMA and ZSTD adopt a more generous moving window of 1MB. - Both DEFLATE and ZSTD adopts the classic Huffman coding for reducing the information entropy.
But ZSTD can also support a further advanced mechanism based on Finite State Entropy, a very recent tecnique being much faster.
- The old DEFLATE was designed so to require a very limited amount of memory, and this impaired someway it's efficiency.
Whenever possible and appropriate the following lossless compression methods specifically intended for images / rasters will be tested as well:
- PNG
This is a very popular format supporting RGB and Grayscale images (with or without Alpha transparencies).
PNG fully depends on DEFLATE for data compression. - CharLS
This is an image format (RGB and Grayscale) having a limited diffusion but rather popular for storying medical imagery.
CharLS is based on Lossless JPEG, a genuinely lossless image compression schema not to be confused with plain JPEG (that is the most classic example of lossy compression). - Jpeg2000
This is intended to be a more advanced replacement for JPEG, but is's not yet so widely supported as its ancestor.
Jpeg2000 is an inherently lossy compression, but under special settings it can effectively support a genuine lossless compression mode. - WebP
This too is an innovative image format pretending to be a better replacemente for JPEG.
WebP images are expected to support the same visual quality of JPEG but requiring a significantly reduced storage space.
Exactely as Jpeg2000 WebP too is an inherently lossy compression, but under special settings it can effectively support a genuine lossless compression mode.
Testing generic datasets
We'll start first by testing several generic datasets, so to stress all compression methods under the most common conditions.The same dataset will be compressed and then decompressed using each method, so to gather informations about:
- the size of the resulting compressed file.
The ratio between the uncompressed and compressed sizes will correspond to the compression ratio. - the time required to compress the original dataset.
- the time required to decompress the compressed file so to recover the initial uncompressed dataset.
Note: compressing is a much harder operation than decompressing, and will always require more time.
The speed differences between the various compression algorithms will be strong and well marked when compressing, but also the differences in decompression speeds (although less impressives) are worth to be carefully evaluated.
- for any compression algorithm being slow (or even very slow) when compressing can be easily considered a trivial and forgivable issue.
Compression usually happens only once in the lifetime of a compressed dataset, and there are many ways for minimizing the adverse effects of intrinsic slowness.
You could e.g. compress your files in batch mode, may be during off-peack hours, and in such a scenario reaching stronger compression ratios could easily justify a longer process time.
Or alternatively you could enable (if possible) a multithread compression approach (parallel processing), so to significantly reduce the required time. - being slow when decompressing is a much more serious issue, because decompression will happen more frequently; very frequently in some specific scenario.
So a certain degree of slowness in decompression could easily become a serious bottleneck severely limiting the overall performances of your system.
Back to RasterLite2 doc index