What is lzma
Last updated: April 1, 2026
Key Facts
- LZMA achieves compression ratios of 30-60% of original file size, superior to deflate and LZ4 compression
- The algorithm combines dictionary-based compression with range coding for entropy encoding and uses dictionary windows up to 4 GB
- LZMA is the default compression method in the 7z archive format which is open-source and widely used
- Compression speed is slower than deflate or LZ4, but decompression remains reasonably fast for practical use
- LZMA is open-source software available under public domain or LGPL license with implementations in C and other languages
Overview
LZMA (Lempel-Ziv-Markov Chain) is a lossless data compression algorithm developed by Igor Pavlov specifically designed to achieve maximum compression ratios. LZMA is significantly more effective at reducing file sizes than commonly used algorithms like deflate, making it ideal for situations where storage space or bandwidth is expensive and compression time is not critical.
Compression Methodology
LZMA combines two compression techniques: dictionary-based compression that identifies repeated byte sequences and replaces them with references, and range encoding for efficient entropy coding. The algorithm can use extremely large dictionary windows up to 4 GB, allowing it to find distant matches for redundant patterns. Range encoding is more efficient than Huffman coding at further compressing the encoded data.
Compression Performance Metrics
LZMA typically achieves compression ratios of 30-60% of original file size, surpassing deflate compression which reaches 30-50%. This superior compression comes at a cost: compression is much slower, potentially requiring seconds or minutes for large files. Decompression, however, remains reasonably fast, making LZMA well-suited for compression-once distribution scenarios.
7z Archive Format Integration
LZMA is the primary compression method in the 7z archive format, which has gained significant adoption for achieving superior compression ratios. The 7z format can contain multiple files with optional encryption and is widely available on Windows through 7-Zip, on Unix/Linux through p7zip, and on macOS. This format represents one of LZMA's most visible applications.
Modern Applications
LZMA is used extensively in Linux distributions for compressing kernel images and large software packages, in backup solutions where storage efficiency matters, and in scenarios with bandwidth constraints. The XZ utility provides LZMA compression on Unix systems, and language bindings exist for Python and other languages, making LZMA accessible across diverse development environments and use cases.
Related Questions
What is the difference between LZMA and LZ4?
LZMA prioritizes maximum compression ratio (30-60%) with slower processing, while LZ4 prioritizes speed with 250-500 MB/s compression and lower ratios. Choose LZMA for archival and LZ4 for real-time applications.
What is the 7z file format?
7z is an open-source archive format using LZMA compression by default, supporting multiple files, optional encryption, and achieving superior compression ratios compared to ZIP. It's widely used on Windows via 7-Zip and on Unix systems.
What is range encoding in compression?
Range encoding is an entropy encoding technique treating compressed data as continuous probability ranges rather than discrete symbols. It's more efficient than Huffman coding and is used in LZMA's second compression stage to further reduce file size.
More What Is in Daily Life
- What Is a Credit ScoreA credit score is a three-digit number, typically ranging from 300 to 850, that represents your cred…
- What Is CD rates make no sense based on length of time invested. Explain like I'm 5CD (Certificate of Deposit) rates often don't increase with longer lock-up times the way people expe…
- What is a phdA PhD (Doctor of Philosophy) is a doctoral degree earned after completing advanced academic research…
- What is a polymathA polymath is a person with deep knowledge and expertise across multiple different fields or academi…
- What is aaveAAVE stands for African American Vernacular English, a dialect with distinct grammar, pronunciation,…
- What is aarch64ARMv8-A (commonly called ARM64 or AArch64) is a 64-bit processor architecture developed by ARM Holdi…
- What is about menTopics and discussions about men typically encompass masculinity, male identity, gender roles, men's…
- What is abiturAbitur is the German academic qualification awarded upon completion of secondary education, typicall…
- What is abrosexualAbrosexual is a sexual orientation identity where a person's sexual attraction changes or fluctuates…
- What is abgABG is an Indonesian acronym standing for 'Anak Baru Gede,' which refers to adolescent girls or teen…
- What is aaaAAA batteries are a standard cylindrical battery size measuring 10.5mm in diameter and 44.5mm in len…
- What is aacAAC (Advanced Audio Codec) is a digital audio compression format that provides better sound quality …
- What is aaa gameAAA games are high-budget video games developed by large studios with budgets typically exceeding $1…
- What is a proxyA proxy is a server that acts as an intermediary between your device and the internet, forwarding yo…
- What is ableismAbleism is discrimination and prejudice against people with disabilities based on the assumption tha…
- What is absAbs, short for abdominal muscles, are the muscles in your core that flex your spine and stabilize yo…
- What is abortionAbortion is a medical procedure that ends pregnancy by removing the fetus before viability. It can b…
- What is accutaneAccutane (isotretinoin) is a powerful prescription medication derived from vitamin A used to treat s…
- What is acetaminophenAcetaminophen, also known as paracetamol, is an over-the-counter pain reliever and fever reducer use…
- What is acidAcid is a chemical substance that donates protons (hydrogen ions) to other substances, characterized…
Also in Daily Life
- How To Save Money
- Why are so many white supremacist and right wings grifters not white
- Does "I'm 20 out" mean youre 20 minutes away from where you left, or youre 20 minutes away from your destination
- Why are so many men convinced that they are ugly
- What does awol mean
- What does asl mean
- What does ad mean
- What does asap mean
- What does apex mean
- What does asmr stand for
- What does atp mean
- What causes autism
- What does abg mean
- What does am and pm mean
- What does a fox sound like
More "What Is" Questions
Trending on WhatAnswer
Browse by Topic
Browse by Question Type
Sources
- Wikipedia - LZMA CC-BY-SA-4.0
- XZ Utils - LZMA Implementation Public Domain