grass
grass copied to clipboard
[Feat] add support for libdeflate in configure
Is your feature request related to a problem? Please describe.
libdeflate is reported to be about 2-4x faster than zlib (Fedora changes GDAL compilation from zlib to libdeflate, see request on bugzilla).
Describe the solution you'd like
Add support for libdeflate as optional alternative to configure.
This might speed up esp. raster data processing.
Needed changes
As far as I understand the current configure content, some extra lines would be needed in configure.ac.
Probably more changes are needed to update also
- https://grass.osgeo.org/grass-stable/manuals/r.compress.html#overview-of-available-compression-algorithms
- and related.
For an initial benchmarking, the configure.ac changes might be enough.
Slightly interesting if there is a real demand for it. Does it mean that it would be considered like a new compression format, or just another library for an existing format? How can it be tested if we want to officially support?
From what I understand it is another library for an existing format. Hence a potential performance improvement.
As far as I understand libdeflate is not a "replacement" to zlib, meaning this is not only a question of configuration. See example from GDAL : https://github.com/OSGeo/gdal/commit/01b3560c90b3a7ae005dd67c69eae85262adcec3
As far as I understand libdeflate is not a "replacement" to zlib, meaning this is not only a question of configuration. See example from GDAL : OSGeo/gdal@01b3560
Yes, support for libdeflate needs to be added to https://github.com/OSGeo/grass/blob/main/lib/gis/cmprzlib.c with e.g. some #if HAVE_LIBDEFLATE ... #else ... #endif and libgis needs to be linked against libdeflate.