AOCL-Compression - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English

2. AOCL-Compression

2.1. Introduction

AOCL-Compression is a software framework of various lossless compression and decompression methods tuned and optimized for AMD Zen™ based CPUs. This framework offers a single set of unified APIs for all the supported compression and decompression methods which facilitate the applications to easily integrate and use them. For AOCL-Compression framework APIs, refer to Unified API.

2.1.1. Methods Supported

AOCL-Compression supports compression and decompression methods of the following libraries.

It supports the dynamic dispatcher feature that executes the most optimal function variant implemented using Function Multi-versioning thereby offering a single optimized library portable across different x86 CPU architectures. AOCL-Compression framework is developed in C for UNIX® and Windows® based systems. A test suite is provided for the validation and performance benchmarking of the supported compression and decompression methods. This suite also supports the benchmarking of IPP compression methods, such as, lz4, lz4hc, zlib and bzip2. The library build framework offers CTest-based testing of the test cases implemented using GTest and the library test suite. Starting from AOCL-Compression 4.2, the library offers openMP based multi-threaded compression for all the methods (for LZMA, only multi-threaded compression is supported).

2.2. Unified APIs

Unified API abstracts individual compression and decompression routines into a single, standardized interface that uses a common handle and shared data structures, simplifying integration and maintenance compared to managing separate APIs for each method.

2.3. Native APIs

In-depth overview of native APIs provided by compression methods included in AOCL-Compression are described here.

2.4. Multi-threaded APIs

These APIs are designed to take advantage of multi-core CPUs to improve the performance of compression and decompression. The library needs to be built with AOCL_ENABLE_THREADS=ON for multi-core processing to be enabled.

2.4.1. LZ4

2.4.2. ZLIB

2.4.3. ZSTD

AOCL Optimized multi-threaded APIs

Native multi-threaded APIs

The library needs to be built with NATIVE_ENABLE_THREADS=ON & AOCL_ENABLE_THREADS=OFF for multi-core processing to be enabled for these APIs.

2.4.4. SNAPPY

2.4.5. LZ4HC

2.4.6. BZIP2

2.4.7. LZMA

2.5. Examples

Example programs illustrating how to use AOCL-Compression APIs are presented here.

Contacts

AOCL-Compression is developed and maintained by AMD. For support, send an email to toolchainsupport@amd.com.