<div dir="ltr"><div><div>ZSTD compression has been added to trunk with r71889-92.<br><br>ZSTD compression can be added with configure --with-zstd=yes or simpler configure --with-zstd<br><br>In order to get some wider testing, ZSTD is now the default compression method in trunk if ZSTD is available.<br><br>ZSTD is an improvement over ZLIB: generally it compresses faster and 
higher than ZLIB. Decompression is consistently much faster than with 
ZLIB. For more information on ZSTD (Zstandard), see<br><a href="http://facebook.github.io/zstd/">http://facebook.github.io/zstd/</a><br><a href="https://github.com/facebook/zstd">https://github.com/facebook/zstd</a><br><br></div>Please test!<br><br></div>Markus M<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 2, 2017 at 12:35 PM, Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Oct 31, 2017 at 8:35 PM, Markus Metz<br>
<<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a><wbr>> wrote:<br>
> On Tue, Oct 31, 2017 at 12:16 PM, Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>> wrote:<br>
>><br>
>> On Mon, Oct 30, 2017 at 9:58 AM, Markus Metz<br>
>> <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a><wbr>> wrote:<br>
>> ...<br>
>> > Some more tests:<br>
>> > corine land cover 250 meter, relatively small, easy to compress Byte<br>
>> > type<br>
>> > LZ4: 33 sec, 54 MB<br>
>> > ZLIB level 1: 36 sec, 39 MB<br>
>> > ZSTD level 3: 34 sec, 29 MB<br>
>> ><br>
>> > GMTED2010 for the corine region as float, difficult to compress<br>
>> > LZ4: 27 sec, 3.1 GB<br>
>> > ZLIB level 1: 129 sec, 2.7 GB<br>
>> > ZSTD level 3: 38 sec, 2.8 GB<br>
>> ><br>
>> > GMTED2010 for the corine region as integer, easy to compress but a lot<br>
>> > of<br>
>> > data<br>
>> > LZ4: 38 sec, 1.4 GB<br>
>> > ZLIB level 1: 73 sec, 993 MB<br>
>> > ZSTD level 3: 53 sec, 982 MB<br>
>> ><br>
>> > attempting maximum compression of GMTED2010 as integer<br>
>> > ZLIB level 9: 735 sec, 945 MB<br>
>> > ZSTD level 19: 485 sec, 846 MB<br>
>> > BZIP2: 273 sec, 618 MB<br>
>> ><br>
>> > With easy to compress data, ZSTD is faster and compresses better than<br>
>> > ZLIB.<br>
>> > With difficult to compress data (floating point), ZSTD is at least 3x<br>
>> > faster<br>
>> > than ZLIB with slightly worse compression than ZLIB, but still better<br>
>> > than<br>
>> > LZ4.<br>
>><br>
>> Thanks for these comparisons! Quite interesting (especially for<br>
>> datasets which need to be stored on expensive SSDs).<br>
><br>
> Also interesting for a GRASS database on a remote cloud (i.e. slow data<br>
> transfer).<br>
>><br>
>> >> The zstd API is similar to the API of zlib/lz4/bzip2, that means adding<br>
>> >> zstd to GRASS could be done by cloning e.g. the GRASS interface to lz4.<br>
>> ><br>
>> > ZSTD seems to be an improvement over ZLIB: it is always faster and most<br>
>> > of<br>
>> > the time compression ratio is higher. I see the biggest advantage for<br>
>> > difficult to compress data where ZSTD is considerably faster than ZLIB,<br>
>> > with<br>
>> > similar compression. Therefore I think adding ZSTD to GRASS would be a<br>
>> > good<br>
>> > idea.<br>
>><br>
>> It looks very promising (how much effort would that be?).<br>
><br>
> basically the same like for bzip2<br>
><br>
> 1. add ZSTD to configure, <a href="http://config.h.in" rel="noreferrer" target="_blank">config.h.in</a>, <a href="http://Platform.make.in" rel="noreferrer" target="_blank">Platform.make.in</a><br>
> 2. link gislib against ZSTD if requested and available<br>
> 3. add the interfaces to ZSTD in a new cmprzstd.c<br>
> 4. test that everything is working fine and that ZSTD in GRASS is indeed an<br>
> improvement over ZLIB.<br>
><br>
> alltogether 4-5 days I guess.<br>
<br>
</div></div>ok, we'll fund that development :-)<br>
<br>
markusN<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
Markus Neteler, PhD<br>
<a href="http://www.mundialis.de" rel="noreferrer" target="_blank">http://www.mundialis.de</a> - free data with free software<br>
<a href="http://grass.osgeo.org" rel="noreferrer" target="_blank">http://grass.osgeo.org</a><br>
<a href="http://courses.neteler.org/blog" rel="noreferrer" target="_blank">http://courses.neteler.org/<wbr>blog</a><br>
</div></div></blockquote></div><br></div>