<div dir="ltr"><div>On Tue, Sep 6, 2016 at 3:23 PM, Markus Metz <<a target="_blank" href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a><wbr>> wrote:<br>> On Tue, Sep 6, 2016 at 1:44 PM, Markus Neteler <<a target="_blank" href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>> wrote:<br>>> Hi,<br>>><br>>> since my local drive was filled up again :) I checked raster how data are<br>>> currently compressed in GRASS GIS 7.2.svn.<br>>> According to<br>>><br>>> <a target="_blank" href="https://grass.osgeo.org/grass72/manuals/r.compress.html#used-compression-algorithms">https://grass.osgeo.org/grass7<wbr>2/manuals/r.compress.html#<wbr>used-compression-algorithms</a><br>>><br>...<br>> The manual says, as you cited:<br>> "Raster maps are by default ZLIB compressed."<br>> What exactly is unclear about this? Should it say "All raster maps ..." ?<br><br>Well, it is perhaps ok but the software appeared to behave differently.<br><br>...<br>> The default ZLIB compression level was invalid, causing ZLIB to not<br>> compress at all. Fixed in r69387,8.<br><br>Ah! So, that changes it dramatically :-) Thanks for the quick fix:<br><span style="font-family:monospace,monospace"><br>-rw-r--r-- 1 mneteler mneteler 2539235691 Jun 14 17:19 s2_20151225_B03_10m          <<-- before<br>-rw-r--r-- 1 mneteler mneteler 1463080868 Sep  6 16:46 s2_20151225_B03_10m_NEWCOPY  <<-- now, generated with r.mapcalc = operator<br></span><br>Great.<br>And comparing to the previously full file-based gzip test:<br></div><div><br>-rw-r--r-- 1 mneteler mneteler 1456248453 Jun 14 17:19 s2_20151225_B03_10m.gz<br><br>> 1463080868 / 1456248453<br>[1] 1.004692<br><br></div><div>... which is now almost the same compression rate.<br></div><div><br></div><div>Some more values:<br><br></div><div>- before today's bugfix:<br><span style="font-family:monospace,monospace">du -hs PERMANENT/<br>30G    PERMANENT/</span><br><br></div><div>- after the bugfix (copies created with r.mapcalc, original raster maps removed):<br><span style="font-family:monospace,monospace">du -hs PERMANENT/<br>25G    PERMANENT/</span><br><br></div><div>- using export GRASS_COMPRESS_NULLS=1 and running r.null -z on all raster maps <br>  which generates cell_misc/nullcmpr and removes the old uncompressed cell_misc/null:<br><span style="font-family:monospace,monospace">du -hs PERMANENT/<br>21G    PERMANENT/</span><br></div><div><br></div><div>Now a notable amount of (SSD) disk space is saved - 21GB usage instead of 30GB!<br></div><div>Goal of trac #<a href="https://trac.osgeo.org/grass/ticket/2349" target="_blank">2349</a> achieved.</div><div><br></div><div>Thanks again,<br></div><div>markusN<br></div><div><br></div><div>PS: it would be great to know through a user message is r.null -z is actually compressing or uncompressing...<br></div><div><br>-- <br>Markus Neteler<br><a target="_blank" href="http://www.mundialis.de">http://www.mundialis.de</a> - free data with free software<br><a target="_blank" href="http://grass.osgeo.org">http://grass.osgeo.org</a><br><a target="_blank" href="http://courses.neteler.org/blog">http://courses.neteler.org/blo<wbr>g</a></div></div>