Lossless image compression

Boudewijn Rempt boud at valdyas.org
Tue Feb 7 14:01:12 UTC 2012


On Tue, 7 Feb 2012, Dmitry Kazakov wrote:

> Compression
> For the actual compression of the tile data we use LZF algorithm. I did some research on the compression times of LZO and LZF [0], [1]. It
> turned out that LZF has better times. It takes twice faster to compress the image with LZF while keeping almost the same compression rate.
> One more thing I found then is that it is faster to "linearize" colors before compression and then compress the image than compress the
> image directly (RGBARGBA -> RRGGBBAA). It boosts both the speed and the compression rate. The time of the "linearization" itself is
> negligible in comparison with the boost it give, so now we do it this way.
>

Well, actually when Sven wanted to know why loading and saving files is so 
slow, it turns out that the linearization is the biggest bottleneck we 
currently have! But that might depend a lot on cache sizes and so on. In
general, we want to avoid missing the cache when compressing a tile.

Boudewijn


More information about the kimageshop mailing list