Skip to main content
  • Products
  • Evaluate our Software
  • Downloads
  • Free Utilities
  • Purchase
  • Silicon Vendors
  • Support
  • About Us
  • Blog
  • Forum
  • Search
  • Jobs
  • Newsletter
  • Blog
  • Contact
  • Shop
  • emCompress
  • emCompress-LZMA

    emCompress-LZMA
    The firmware update accelerator

    emCompress-LZMA is a compression toolkit, designed to compress data on a host computer and decompress it on a target system.

    Contact us
    Downloads
    Documentation
    SEGGER emCompress
    1. 1.Key features
    2. 2.Performance numbers
    3. 3.API use
    4. 4.Use case
      1. 4.1.Speed up firmware updates

    Overview

    emCompress-LZMA is a cost-effective compression library for speeding up firmware updates. It implements the lossless compression algorithm LZMA, which is used by popular compression tools, such as 7zip. emCompress-LZMA enables you to use LZMA decompression even on small embedded targets.

    Key features

    • Compression and decompression of firmware images
    • Compatible with standard LZMA compression tools
    • Easy-to-use zlib-like API
    • Libraries for host and embedded applications

    Performance numbers

    emCompress-LZMA implements the LZMA (Lempel–Ziv–Markov chain) lossless compression algorithm which was first used in the 7z file format. This algorithm uses a dictionary compression scheme similar to the LZ77 algorithm and features a high compression ratio and a variable compression-dictionary size, while still maintaining decompression speed similar to other commonly used compression algorithms.

    CodecCompressed size [1]Compression speed [2]Decompression speed [2]Compression RAMDecompression RAM
    LZMA(1k,0,0,0)108.676 KB282876.010 MB5,060 B
    LZMA(1k,3,1,1)103.675 KB289916.010 MB27.613 KB
    LZMA(2k,0,0,0)106.270 KB363916.015 MB6,084 B
    LZMA(2k,3,1,1)101.701 KB378936.015 MB28.613 KB
    LZMA(4k,0,0,0)104.640 KB582856.025 MB8,132 B
    LZMA(4k,3,1,1)100.450 KB593906.025 MB30.613 KB
    LZMA(8k,0,0,0)103.592 KB980876.044 MB11.941 KB
    LZMA(8k,3,1,1)99.742 KB992876.044 MB34.613 KB
    LZMA(16k,0,0,0)102.706 KB1,821826.083 MB19.941 KB
    LZMA(16k,3,1,1)99.198 KB1,785856.083 MB42.613 KB
    LZMA(32k,0,0,0)102.059 KB2,389976.162 MB35.941 KB
    LZMA(32k,3,1,1)98.808 KB2,550866.162 MB58.613 KB
    LZMA(64k,0,0,0)100.030 KB4,182896.318 MB67.941 KB
    LZMA(64k,3,1,1)97.180 KB4,274836.318 MB90.613 KB
    LZMA(128k,0,0,0)99.840 KB5,081856.630 MB131.941 KB
    LZMA(128k,3,1,1)97.067 KB5,026866.630 MB154.613 KB
    LZMA(256k,0,0,0)99.851 KB3,001837.255 MB259.941 KB
    LZMA(256k,3,1,1)97.080 KB3,212877.255 MB282.613 KB

    [1]  Uncompressed input size: 182.695 KB

    [2]  ns/Byte on Intel i7 @ 4.6GHz, only for comparison between codecs

    API use

    emCompress-LZMA provides a simple zlib-like API for the incremental processing of input. This interface enables compression and decompression of data on the fly. It can be used to process data in chunks as they are received from a remote system instead of requiring that all data be available at once. It can also be used to process data and output chunks into a small buffer for further processing instead of requiring a large output buffer that can hold all of the compressed or decompressed data at once. This can reduce memory buffer requirements.

    Use case

    emCompress-LZMA is the cost-effective solution for accelerating firmware updates by compressing and decompressing the firmware image.

    Speed up firmware updates

    Modern products, in particular IoT devices, require the ability to update their firmware in the field. Most of these devices implement over-the-air (OTA) updates through their main communication channel. When a device is connected via WiFi, available bandwidth is not an issue, but other channels such as Bluetooth or Zigbee might have limited bandwidth. Also, updates via wired connections often have bandwidth restrictions, e.g. the popular CAN bus.

    To speed up the update process, lossless compression of firmware images reduces the amount of data to be transferred to the device. emCompress-LZMA enables firmware updates with compressed images. They can be easily compressed with the tool included in emCompress-LZMA. Once compressed, one can simply deploy the compressed file and send it to the target.

    The emCompress-LZMA interface is suited to receive a compressed data stream and to decompress it on the fly for the update module, which processes the decompressed data afterward. For compressed firmware updates, the target decompresses the received data and immediately writes it to flash in small chunks. This removes the need to decompress the whole firmware image first before doing the update.

    emCompress-LZMA includes the compressor in a simple-to-use tool as well as in a dynamic library to easily include compression with your tools. It is also compatible with standard LZMA compression tools.

    The decompressor is included in a library and can be included into any application, running on a computer or on a microcontroller. It is not limited to 32-bit architectures, but can be used even on 8-bit and 16-bit devices.

    Learn more at:
    https://casestudies.segger.com/size-matters-using-emcompress-to-accelerate-firmware-updates-via-can-bus/


    Related news

    2021
    Aug.16
    emCompress
    SEGGER News: eSOL licences SEGGER emCompress for accelerating automotive firmware updates

    eSOL licences SEGGER emCompress for accelerating automotive firmware updates

    Leading Japanese embedded engineering supplier eSOL has licensed SEGGER's emCompress compression software to enable faster firmware updates in Electronic Control Units (ECUs) for automotive customers.

    [Read more...]

    All news

    • User manual
    • Online documentation
    • List of downloads
    • Update notification
    • Pricing
    • Support
    • Silicon vendor resources
    • Videos

    Headquarters

    SEGGER Microcontroller GmbH

    Ecolab-Allee 5
    40789 Monheim am Rhein, Germany
    info@segger.com
    Tel.: +49-2173-99312-0
    Fax: +49-2173-99312-28

    Locations

    USA: SEGGER Microcontroller Systems LLC

    Boston area
    101 Suffolk Lane
    Gardner, MA 01440, USA
    us-east@segger.com
    Tel.: +1-978-874-0299
    Fax: +1-978-874-0599

    Silicon Valley
    Milpitas, CA 95035, USA
    us-west@segger.com
    Tel.: +1-408-767-4068

    China: SEGGER Microcontroller China Co., Ltd.

    Room 218, Block A, Dahongqiaoguoji
    No. 133 Xiulian Road
    Minhang District, Shanghai 201199, China
    china@segger.com
    Tel.: +86-133-619-907-60

    ISO 9001 certified

    ISO 9001

    30+ years of experience

    First-class embedded software tools since 1992
    • Imprint
    • Disclaimer
    • Code of Conduct
    • Privacy Policy
    © 2025 SEGGER - All rights reserved.