There are 2 main types of compression. Lossy compression is a data encoding method which reduces a file by discarding certain information. When the file is uncompressed, not all of the original information will be recovered. Lossy compression is typically used to compress video, audio and images, as well as internet telephony. The fact that information is lost during compression will often be unnoticeable to most users. Lossy compression techniques are used in all DVDs, Blu-ray discs, and most multimedia available on the internet.
JPEG XL is a royalty-free raster-graphics file format that supports both lossy and lossless compression. It is designed to outperform existing raster formats.
libjxl is a reference implementation of JPEG XL. This is free and open source software written in C++.
The software was evaluated using Ubuntu 23.10. Installation was straightforward.
$ sudo apt install libjxl-tools
The image below shows the installed files.
The installed files including cjxl for encoding and djxl for decoding.