harmony 鸿蒙zlib
zlib
Introduction
zlib is a general data compression library implemented in C/C++.
Supported Capabilities
The zlib library provides in-momery data compression and decompression. By employing the deflate algorithm, it is possible to select from various compression levels to optimize the compression performance for a range of data types. It also provides control over processor and memory usage. If the buffer is large enough, the compression process can be completed in a single step. In cases where the buffer is not large enough, the compression can be completed through multiple iterations of calling the compression interfaces.
By default, the zlib interfaces use the zlib format (RFC1950). In addition, the zlib library provides interfaces that start with gz to read and write gzip files (RFC1952). The zlib format is designed for efficient use in memory and communication channels, ensuring both compactness and swift performance. The gzip format is designed for the compression of individual files. Its header is larger than that of zlib in order to maintain directory information. gzip uses a check method that, while different, is comparatively slower than the one used by zlib.
The decoder within the zlib library checks the integrity of compressed data. Therefore, the library will not crash even in the case of corrupted input.
Introducing zlib
To use zlib capabilities, include the following header file:
#include <zlib.h>
Add the following dynamic link library to CMakeLists.txt:
libz.so
Supported APIs
For details, see zlib.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Native API Standard Libraries
harmony 鸿蒙VkExternalFormatOHOS
harmony 鸿蒙VkImportNativeBufferInfoOHOS
harmony 鸿蒙VkMemoryGetNativeBufferInfoOHOS
harmony 鸿蒙VkNativeBufferFormatPropertiesOHOS
harmony 鸿蒙VkNativeBufferPropertiesOHOS
harmony 鸿蒙VkNativeBufferUsageOHOS
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦