<div dir="ltr"><div><br><br>On Tue, Dec 5, 2017 at 10:55 AM, Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>> wrote:<br>><br>> Great indeed!<br>> Any chance to get that in 7.4.1?<br>> Or would we have to wait for 7.6 to utilize this in production?<br><br></div>ZSTD compression is a new feature and the changes are not trivial, considering  the changesets for r71889, r71890, r71891. There is a minimal chance to get ZSTD compression in 7.4. GRASS 7.4.0 is not yet out, therefore ZSTD might go to there, at the risk of slowing down the release of GRASS 7.4.0. Any subsequent 7.4.x releases will be only bug-fix releases. GRASS 7.4.0 should get out in time to make it into the next releases of major Linux distros.<br><div><br></div><div>Markus M<br></div><br><div>><br>> Cheers<br>> Stefan<br>><br>> -----Original Message-----<br>> From: grass-dev [mailto:<a href="mailto:grass-dev-bounces@lists.osgeo.org">grass-dev-bounces@lists.osgeo.org</a>] On Behalf Of Markus Neteler<br>> Sent: tirsdag 5. desember 2017 10.08<br>> To: Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>><br>> Cc: GRASS developers list <<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>><br>> Subject: Re: [GRASS-dev] GRASS GIS raster files: LZW compression?<br>><br>> On Mon, Dec 4, 2017 at 7:32 PM, Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>> wrote:<br>> > ZSTD compression has been added to trunk with r71889-92.<br>><br>> Great!<br>><br>> > ZSTD compression can be added with configure --with-zstd=yes or<br>> > simpler configure --with-zstd<br>> ><br>> > In order to get some wider testing, ZSTD is now the default<br>> > compression method in trunk if ZSTD is available.<br>> ><br>> > ZSTD is an improvement over ZLIB: generally it compresses faster and<br>> > higher than ZLIB. Decompression is consistently much faster than with<br>> > ZLIB. For more information on ZSTD (Zstandard), see<br>> > <a href="http://facebook.github.io/zstd/">http://facebook.github.io/zstd/</a> <a href="https://github.com/facebook/zstd">https://github.com/facebook/zstd</a><br>> ><br>> > Please test!<br>><br>> Here an initial test with a WorldClim DECLL map:<br>><br>><br>> GRASS 7.5.svn (latlong_wgs84): ><br>><br>> g.region raster=tmean_12 -p<br>> projection: 3 (Latitude-Longitude)<br>> zone:       0<br>> datum:      wgs84<br>> ellipsoid:  wgs84<br>> north:      90N<br>> south:      60S<br>> west:       180W<br>> east:       180E<br>> nsres:      0:00:30<br>> ewres:      0:00:30<br>> rows:       18000<br>> cols:       43200<br>> cells:      777600000<br>><br>> r.compress -p tmean_12<br>> <tmean_12> is compressed (method 2: ZLIB). Data type: DCELL <tmean_12> has a compressed NULL file<br>><br>><br>> # create a ZSTD compressed copy:<br>> export GRASS_COMPRESS_NULLS=1<br>> export GRASS_COMPRESSOR=ZSTD<br>><br>> r.mapcalc "tmean_12_ZSTD = tmean_12"<br>><br>> r.compress -p tmean_12_ZSTD<br>> <tmean_12_ZSTD> is compressed (method 5: ZSTD). Data type: DCELL <tmean_12_ZSTD> has a compressed NULL file<br>><br>> # run r.univar<br>> time -p r.univar -g tmean_12<br>> n=222262507<br>> null_cells=555337493<br>> cells=777600000<br>> min=-51.9<br>> max=33.3<br>> range=85.2<br>> mean=-0.434087630455532<br>> mean_of_abs=18.7414294225023<br>> stddev=21.0312119498642<br>> variance=442.31187608011<br>> coeff_var=-4844.92311559167<br>> sum=-96481405.002736<br>> real 20.43<br>> user 20.21<br>> sys 0.11<br>><br>> # comparison (results & timing)<br>> time -p r.univar -g tmean_12_ZSTD<br>> n=222262507<br>> null_cells=555337493<br>> cells=777600000<br>> min=-51.9<br>> max=33.3<br>> range=85.2<br>> mean=-0.434087630455532<br>> mean_of_abs=18.7414294225023<br>> stddev=21.0312119498642<br>> variance=442.31187608011<br>> coeff_var=-4844.92311559167<br>> sum=-96481405.002736<br>> real 15.43<br>> user 15.31<br>> sys 0.07<br>><br>> # expectedly, the ZSTD is faster and it takes r.univar only ~ 75% compared to ZLIB:<br>> > 15.43/20.43<br>> [1] 0.7552619<br>><br>> ####<br>> # file sizes comparison:<br>> find . -name tmean_12 | sort | xargs du -h<br>> 4.0K    ./cats/tmean_12<br>> 4.0K    ./cellhd/tmean_12<br>> 2.7M    ./cell_misc/tmean_12<br>> 0    ./cell/tmean_12<br>> 12K    ./colr/tmean_12<br>> 256M    ./fcell/tmean_12<br>> 4.0K    ./hist/tmean_12<br>><br>> find . -name tmean_12_ZSTD | sort | xargs du -h<br>> 4.0K    ./cats/tmean_12_ZSTD<br>> 4.0K    ./cellhd/tmean_12_ZSTD<br>> 2.7M    ./cell_misc/tmean_12_ZSTD<br>> 0    ./cell/tmean_12_ZSTD<br>> 12K    ./colr/tmean_12_ZSTD<br>> 195M    ./fcell/tmean_12_ZSTD<br>> 4.0K    ./hist/tmean_12_ZSTD<br>><br>> # fcell size comparison in detail, here ZSTD is of ~75% smaller file compared to ZLIB:<br>> > 203521319/268155000<br>> [1] 0.758969<br>><br>><br>> # my system: Fedora 26, 64bit, SSD disk, Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz<br>><br>> Great!<br>><br>> markusN<br>> _______________________________________________<br>> grass-dev mailing list<br>> <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-dev">https://lists.osgeo.org/mailman/listinfo/grass-dev</a><br><br></div></div>