Skip navigation

emCompress—Embedded Compression Libraries

Achieve more with highly efficient data compression!

  • For embedded devices, apps and PC software
  • Small decompressor ROM footprint
  • Wide range of compression algorithms
  • Simple to configure, and integrate
  • Three editions to fit any need for compression
  • Zero RAM algorithm included

About emCompress

Reduced data size for storage and transfer is highly valuable in embedded systems. Reduced storage size minimizes the complexity and cost of systems by keeping memory requirements small. Reduced transfer size overcomes limitations of available bandwidth to send and receive data.

emCompress offers solutions to compress data for all kinds of applications where size matters. Designed for embedded systems, emCompress can compress and decompress data even on smallest microcontrollers.

SEGGER emCompress-ToGo More Storage Icon

More Storage

By compressing the data, a lot more can be stored in flash memory, SPI flash or on the external SD card. This allows a data logger to store more information, or to be less expensive due to the smaller, less expensive storage medium.

SEGGER Tacho Icon

More Bandwidth

On applications using a low bandwidth link, from local applications using Bluetooth to space applications such as a Lunar lander sending data to Earth, with compression more information can be transmitted, in a shorter period of time. 

firmwareupdate-wide.png

Faster Updates

New firmware or update data can be transmitted with less bandwidth, faster and in case the update is stored in memory first, as it usually is, the amount of space required for the new firmware can be less. This allows more efficient use of memory and potentially using a smaller, less expensive device with less flash memory.

emCompress is available in three editions – emCompress-ToGo, emCompress-Flex and emCompress-Embed – that cover different use of compression. Each edition is optimized for its use to provide the most convenient way to compress and decompress your data.

 EditionemCompress-ToGoemCompress-FlexemCompress-Embed
Description

Compress files and streams on host and target with a small and fast algorithm that requires nearly no RAM.

Compress files with standard algorithms on host and decompress on target.

Compress static data to be linked with the application and decompress on target.

On Target Decompression

 

 

 

On Target Compression

 

 

 

Decompress Static Data

 

 

 

Decompress Files&Streams

 

 

 

Available AlgorithmsSMASH-2LZMADEFLATE, Huffman Encoding, LZW, LZSS, LZJU90, RLE-PAR
Use Case

Files and streams directed to or created on embedded systems. Data loggers, Bluetooth devices, avionics and space technology, satellites

Files compressed on the host and transferred to the application such as firmware updates

Static data compiled into the application such as FPGA streams

 Supported      

 Not Supported

emCompress is written in well-commented ANSI C and is both compiler and target independent. In contrast to most compression libraries, emCompress is not covered by an open-source or required-attribution license and can be integrated in any commercial or proprietary product, without the obligation to disclose the combined source.

emCompress-ToGo

Most common compression algorithms require lots of RAM for compression and decompression, which is fine on a computer with gigabytes of memory. But on an embedded system you might only have some kilobytes of RAM available. Therefore the decompressor implementations in emCompress-Flex and emCompress-Embed are already tweaked to run with the least amount of RAM.

To be able to go even lower with RAM requirements, SEGGER developed a compression algorithm that is suited to run on the smallest micros: The Small Microcontroller Advanced Super High (SMASH) Compressor. SMASH can decompress data with only a few bytes on the stack.

emCompress-ToGo includes SMASH to enable use of compression on any system. With emCompress-ToGo and SMASH, data cannot only be decompressed on target. The compressor sources are included, too.

Any system that generates or collects dynamic data, for example an IoT sensor or a data logger, can benefit from data compression with emCompress-ToGo. The system requires less (external) memory to store its collected data and can send more data with limited bandwidth, such as through a Bluetooth 5 Long Range connection.

What's in emCompress-ToGo?

emCompress-ToGo comes with the small and fast SMASH compressor and decompressor in source code that can be included into any application, firmware, or bootloader.

The emCompress-ToGo API for compression and decompression is designed to be easily understandable and usable. emCompress-ToGo includes an extensive user manual and different examples that show its use.

Use Cases

  • Compress and store data on the system.
  • Record and transfer sensor data with limited bandwidth.
  • Decompress data with almost no RAM required.

emCompress-Flex

The size of data to be sent to a system or dynamically stored in its memory can have impact on the complexity of a system, too.

To transmit data, the communication channel and its bandwidth determine how fast it can be received by the system. Even the transmit of a relatively small firmware image for in-field firmware upgrades can be considerably delayed when sent through a cellular network connection. To keep such delays short, the goal is to send as small amounts of data as possible.

To store dynamic data in a system, the maximum storage usage needs to be known when designing the system and determine the required size of internal or external flash. Dynamic data can for example be a file stored by the user on system, such as a picture to be displayed, or web server content that is updated from an external source. To keep the flash size requirements small, only as much data as necessary should be stored.

The data to transmit or store can usually not be made any smaller. A firmware image has its fixed size to contain everything.

With emCompress-Flex those data can still be made smaller for transmit and store, and expanded when required. emCompress-Flex compresses the data before it is sent or stored.

In the system compressed data can be read from memory or received through any available channel. The data is decompressed by emcompress-Flex into memory or immediately passed to a user-defined function for direct processing. A compressed firmware image might be sent via the Ethernet connection to the system where emCompress-Flex directly receives and decompresses it to send the decompressed chunks to a firmware update function.

What's in emCompress-Flex?

emCompress-Flex includes tools to compress files in a convenient way. The compression algorithms are also available as a library to be included into custom tools that prepare data to be sent to a system.

emCompress-Flex ships with the source code for all decompression algorithms to be included in the firmware. One or multiple algorithms can be selected to be available to the system. Usually one algorithm is sufficient, and the best one can be determined on system design, based on what kind of data needs to be  compressed.

Use Cases

  • Speed up transmission through limited bandwidth channels.
  • Save memory when storing dynamic files.

emCompress-Embed

For firmware images of embedded systems it is important to have least ROM requirements to fit everything into the flash memory of the system. But typically, firmware upgrades are only growing in size over the lifetime of a device: features are added to the software and not taken away. A new update might eventually hit the limits of available memory.

A significant part of the firmware image might be static data, such as an FPGA configuration bitstream, static content for a web server, or images, fonts, and translations used for the GUI.

With emComress-Embed this data can be compressed into the firmware image to save memory. When the data is used, for example to send a web page to the browser, emCompress-Embed decompresses the data into RAM or directly sends the output to its destination.

emCompress-Embed can be used with little RAM on the target side for decompression. The amount of RAM available to the decompressor is taken into account during compression and an appropriate compression algorithm is automatically selected. 

What's in emCompress-Embed?

emCompress-Embed includes a compression application that chooses the best compression algorithm based on available target resources and input data and outputs the compressed data to be compiled into the firmware.

emCompress-Embed ships with the source code for all decompressors that can be used in the firmware. Since all compression algorithms are clearly separated only the decompressor that has been used to compress your data needs to be linked into the firmware, keeping the overhead as minimal as possible.

Use Cases

  • Store permanent files for an embedded web server static content.
  • Embed configuration bitstreams for FPGAs and CPLDs.
  • Include a firmware backup image to restore connected devices.
  • Store user interface content for multiple languages.
SEGGR - Video Thumbnail emCompress Button

Introduction to emCompress-Embed

More Information