XZ¶
High compression ratio data compression library and tools
Overview¶
XZ is a free general-purpose data compression library and tools that provide a high compression ratio.
Warning
The version of XZ that was affected by the embedded backdoor code, as outlined in the CERT.EU 2024-032, was not installed on Discoverer and will never be installed in our software repository.
Note
We provide XZ installation that is faster and more reliable than the system-wide one. Therefore, we recommend using our installation instead of the system-wide one (see below).
Available versions¶
To view available xz versions:
$ module avail xz
Build recipes and configuration details are maintained in our GitLab repository:
Compiler support¶
Warning
For not on we will support only LLVM builds of XZ. No other builds will be officially supported.
Supported builds:
$ module avail xz/*/*llvm # LLVM build (recommended)
$ module avail xz/*/*gcc # GCC build (deprecated, will be retired soon)
Legacy builds (retiring soon, deprecated, do not use):
$ module avail xz/*/*intel # Intel oneAPI build (deprecated, will be retired soon)
$ module avail xz/*/*aocc # AMD AOCC build (deprecated, will be retired soon)
Linking your code against xz installation¶
When compiling programming code that uses xz through its API, load the appropriate module and link with -llzma
:
$ module load xz/<version>
$ <compiler or linker> <flags> <source_files or object files> -llzma
Note
Both dynamic and static linking are supported.
Replacing the system-wide xz installation¶
To use the liblzma.so
library from our installation instead of relying on the system-wide installation:
$ module load xz/<version>
$ ./your_program # will automatically use liblzma.so from xz installation
This way your executable will use the xz library from our installation instead of the system-wide one.