Rate This Document
Findability
Accuracy
Completeness
Readability

Introduction

The Kunpeng KZstar compression library is developed based on the open source Zstandard (zstd) compression algorithm. It is optimized for the Kunpeng platform to improve software-based decompression performance. This document provides the installation guidance, application programming interface (API) definitions, and code samples of KZstar to help you quickly get started with this library.

zstd is an open-source fast and lossless compression algorithm developed using the C language. It aims to accelerate compression and decompression and increase the compression ratio. KZstar uses NEON instructions, inline assembly, memory prefetch, adjusted code structure, optimized instruction pipeline layout, and the zstar software optimization library to improve zstd block compression and decompression performance on the Kunpeng platform. KZstar supports only block compression and decompression algorithms and only compression levels 1 to 4. Other levels are processed as level 5.

In KZstar, the block compression capability relates to APIs such as ZSTD_compress() and ZSTD_decompress().

  • KZstar supports only some block compression APIs. You need to check the feasibility based on your specific service scenarios.
  • KZstar parallel optimization is implemented by splitting compressed packages and performing parallel processing. However, this mode may reduce the compression ratio, and the deterioration degree is related to datasets. Therefore, you are not advised to enable parallelism in scenarios where a high compression ratio is required or datasets are not suitable for parallel processing.