[GRASS-dev] Re: disabling compression

Jim Regetz regetz at nceas.ucsb.edu
Wed Apr 25 14:18:19 EDT 2012


On 4/25/12 5:01 AM, Glynn Clements wrote:
>
> Benjamin Ducke wrote:
>
>> But as far as I can see, there is not yet a way to completely
>> prevent rasters from being compressed at creation time?
>
> That's correct. IIUC, Maris is just suggesting that we have one
> variable to select between no compression, RLE, and zlib, rather than
> one variable to enable or disable compression and another to select
> the compression algorithm.
>
> The same principle can be applied to the implementation. Currently,
> R__.compression_type will be either 1 (RLE) or 2 (zlib). Rather than
> adding a separate R__.use_compression field, we can just set
> R__.compression_type to 0 to indicate no compression. That is
> consistent with the "compressed" field of the Cell_head structure.

Agreed -- little reason to use two different variables to describe three 
mutually exclusive choices involving compression.

However, the existing GRASS_INT_ZLIB variable only applies to integer 
rasters, correct? Although in all cases this variable does indeed 
dictate whether the Cell_head "compressed" field is set to 1 or 2, 
AFAICT put_fp_data ignores it and uses zlib for writing compressed 
floating point rasters in either case. Is this intentional?

Jim


More information about the grass-dev mailing list