The Lempel-Ziv-Markov chain-Algorithm (LZMA) is an data compression algorithm. It compresses very well (better than gzip and bzip2), compresses very slowly (much slower than bzip2) but decompresses relatively quickly.

The functions "compress" and "decompress" accept both of scalar and reference as the parameter. If a scalar is given, the function returns a scalar. If a reference is given, the function returns a reference.