2017.12.21 14:14 "[Tiff] Pull request to add ZStandard/ZSTD codec", by Even Rouault

2017.12.21 14:14 "[Tiff] Pull request to add ZStandard/ZSTD codec", by Even Rouault

Hi,

I've submitted a PR to add ZStandard/ZSTD codec: https://gitlab.com/libtiff/libtiff/merge_requests/9

"""

From https://github.com/facebook/zstd "Zstandard, or zstd as short version, is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios. It's backed by a very fast entropy stage, provided by Huff0 and FSE library."

We require libzstd >= 1.0.0 so as to be able to use streaming compression and decompression methods.

The default compression level we have selected is 9 (range goes from 1 to 22), which experimentally offers equivalent or better compression ratio than the default deflate/ZIP level of 6, and much faster compression.

For example on a 6600x4400 16bit image, tiffcp -c zip runs in 10.7 seconds, while tiffcp -c zstd runs in 5.3 seconds. Decompression time for zip is 840 ms, and for zstd 650 ms. File size is 42735936 for zip, and 42586822 for zstd. Similar findings on other images.

On a 25894x16701 16bit image,

                Compression time     Decompression time     File size

ZSTD                 35 s                       3.2 s            399 700 498

ZIP/Deflate       1m 20 s                   4.9 s           419 622 336

""""

My main question is who manages the allocation of TIFF tags/values?

I've auto-allocated:

#define     COMPRESSION_ZSTD            34926   /* ZSTD */

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com