Libaec¶
Fast lossless compression for integer data and SZIP alternative
Overview¶
Libaec provides fast lossless compression of integer data, supporting:
- 1-32 bit wide integers (signed or unsigned)
- Clean-room implementation of SZIP compression
Note
We provide Libaec installation that is faster and more reliable than the system-wide SZIP installation. Therefore, we recommend using our installation instead of the system-wide one (see below).
Available versions¶
To view available libaec versions:
$ module avail libaec
Build recipes and configuration details are maintained in our GitLab repository:
Compiler support¶
Warning
Currently, only LLVM-based builds are supported. LLVM-compiled binaries show better performance, and proper executable code generation. Since Libaec lacks Fortran bindings, standardizing on LLVM builds simplifies maintenance.
Supported builds:
$ module avail libaec/*/*llvm # LLVM build (recommended, soon the prefix llvm will be removed)
Retired builds:
$ module avail libaec/*/*gcc # GNU GCC build
$ module avail libaec/*/*intel # Intel oneAPI build
$ module avail libaec/*/*nvidia # NVIDIA HPC SDK build
$ module avail libaec/*/*aocc # AMD AOCC build
Linking your code against libaec installation¶
When compiling a programming code that uses SZIP compression through its API, load the appropriate module and link with -lsz
:
$ module load libaec/<version>
$ <compiler or linker> <flags> <source_files or object files> -lsz
Note
When linking, both dynamic and static linking are supported and it depends on the compilation configuration which one is the one actually used.
Replacing the system-wide SZIP installation¶
To use the libsz.so
library from our installation instead of relying on the system-wide SZIP installation:
$ module load libaec/<version>
$ ./your_program # will automatically use libsz.so from libaec installation
This way your executable will use the SZIP-compatible library from our libaec installation instead of the system-wide one.
Note
The runtime replacement works only if the running executable is configured to be dynamically linked with libsz.so during the compilation. Static linking always requires recompilation against the static version of the libsz library (see above). Therefore, if you wish to use our static libsz library, you need to recompile your software against our libaec installation.