TDengine/include/util/tcompression.h

318 lines
16 KiB
C
Raw Normal View History

2019-07-11 08:36:16 +00:00
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2022-02-28 02:47:44 +00:00
#ifndef _TD_UTIL_COMPRESSION_H_
#define _TD_UTIL_COMPRESSION_H_
#include "os.h"
#include "taos.h"
#include "tutil.h"
2019-07-11 08:36:16 +00:00
#ifdef __cplusplus
extern "C" {
#endif
2024-03-20 08:51:40 +00:00
// start compress flag
// |----l1 compAlg----|-----l2 compAlg---|---level--|
// |------8bit--------|------16bit-------|---8bit---|
#define COMPRESS_L1_TYPE_U32(type) (((type) >> 24) & 0xFF)
#define COMPRESS_L2_TYPE_U32(type) (((type) >> 8) & 0xFFFF)
#define COMPRESS_L2_TYPE_LEVEL_U32(type) ((type)&0xFF)
// compress flag
// |----l2lel--|----l2Alg---|---l1Alg--|
// |----2bit---|----3bit----|---3bit---|
#define COMPRESS_L1_TYPE_U8(type) ((type)&0x07)
#define COMPRESS_L2_TYPE_U8(type) (((type) >> 3) & 0x07)
#define COMPRESS_L2_TYPE_LEVEL_U8(type) (((type) >> 6) & 0x03)
// end compress flag
2020-04-27 09:40:57 +00:00
#define COMP_OVERFLOW_BYTES 2
2022-02-28 02:47:44 +00:00
#define BITS_PER_BYTE 8
2019-07-11 08:36:16 +00:00
// Masks
2020-09-30 03:02:52 +00:00
#define INT64MASK(_x) ((((uint64_t)1) << _x) - 1)
2019-07-11 08:36:16 +00:00
#define INT32MASK(_x) (((uint32_t)1 << _x) - 1)
2022-02-28 02:47:44 +00:00
#define INT8MASK(_x) (((uint8_t)1 << _x) - 1)
2023-11-12 16:43:13 +00:00
#define ZIGZAG_ENCODE(T, v) (((u##T)((v) >> (sizeof(T) * 8 - 1))) ^ (((u##T)(v)) << 1)) // zigzag encode
#define ZIGZAG_DECODE(T, v) (((v) >> 1) ^ -((T)((v)&1))) // zigzag decode
2019-07-11 08:36:16 +00:00
// Compression algorithm
#define NO_COMPRESSION 0
#define ONE_STAGE_COMP 1
#define TWO_STAGE_COMP 2
2021-07-02 02:08:31 +00:00
//
// compressed data first byte foramt
// ------ 7 bit ---- | ---- 1 bit ----
// algorithm mode
//
// compression data mode save first byte lower 1 bit
2022-02-28 02:47:44 +00:00
#define MODE_NOCOMPRESS 0 // original data
#define MODE_COMPRESS 1 // compatible old compress
2021-07-02 02:08:31 +00:00
// compression algorithm save first byte higher 7 bit
2022-02-28 02:47:44 +00:00
#define ALGO_SZ_LOSSY 1 // SZ compress
#define HEAD_MODE(x) x % 2
#define HEAD_ALGO(x) x / 2
2021-07-19 12:22:34 +00:00
#ifdef TD_TSZ
2021-07-07 12:39:49 +00:00
extern bool lossyFloat;
extern bool lossyDouble;
2024-09-25 10:21:27 +00:00
void tsCompressInit(char *lossyColumns, float fPrecision, double dPrecision, uint32_t maxIntervals, uint32_t intervals,
int32_t ifAdtFse, const char *compressor);
2023-09-19 04:57:18 +00:00
2024-02-28 07:58:24 +00:00
void tsCompressExit();
2020-04-30 07:07:51 +00:00
2023-09-15 06:30:23 +00:00
int32_t tsCompressFloatLossyImp(const char *const input, const int32_t nelements, char *const output);
2024-02-28 07:58:24 +00:00
int32_t tsDecompressFloatLossyImp(const char *const input, int32_t compressedSize, const int32_t nelements,
char *const output);
2023-09-15 06:30:23 +00:00
int32_t tsCompressDoubleLossyImp(const char *const input, const int32_t nelements, char *const output);
2024-02-28 07:58:24 +00:00
int32_t tsDecompressDoubleLossyImp(const char *const input, int32_t compressedSize, const int32_t nelements,
char *const output);
2023-09-15 06:30:23 +00:00
2022-02-28 02:47:44 +00:00
static FORCE_INLINE int32_t tsCompressFloatLossy(const char *const input, int32_t inputSize, const int32_t nelements,
char *const output, int32_t outputSize, char algorithm,
char *const buffer, int32_t bufferSize) {
2021-06-28 09:51:57 +00:00
return tsCompressFloatLossyImp(input, nelements, output);
}
2021-06-24 11:58:45 +00:00
2022-02-28 02:47:44 +00:00
static FORCE_INLINE int32_t tsDecompressFloatLossy(const char *const input, int32_t compressedSize,
const int32_t nelements, char *const output, int32_t outputSize,
char algorithm, char *const buffer, int32_t bufferSize) {
2021-06-28 09:51:57 +00:00
return tsDecompressFloatLossyImp(input, compressedSize, nelements, output);
}
2021-06-24 11:58:45 +00:00
2022-02-28 02:47:44 +00:00
static FORCE_INLINE int32_t tsCompressDoubleLossy(const char *const input, int32_t inputSize, const int32_t nelements,
char *const output, int32_t outputSize, char algorithm,
char *const buffer, int32_t bufferSize) {
2021-06-28 09:51:57 +00:00
return tsCompressDoubleLossyImp(input, nelements, output);
}
2021-06-24 11:58:45 +00:00
2022-02-28 02:47:44 +00:00
static FORCE_INLINE int32_t tsDecompressDoubleLossy(const char *const input, int32_t compressedSize,
const int32_t nelements, char *const output, int32_t outputSize,
char algorithm, char *const buffer, int32_t bufferSize) {
2021-06-28 09:51:57 +00:00
return tsDecompressDoubleLossyImp(input, compressedSize, nelements, output);
}
2021-06-24 11:58:45 +00:00
#endif
2021-06-24 11:58:45 +00:00
2022-09-20 05:39:32 +00:00
/*************************************************************************
* REGULAR COMPRESSION
*************************************************************************/
2022-09-20 03:08:46 +00:00
int32_t tsCompressTimestamp(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressTimestamp(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg,
void *pBuf, int32_t nBuf);
int32_t tsCompressFloat(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressFloat(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsCompressDouble(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressDouble(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsCompressString(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressString(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsCompressBool(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressBool(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsCompressTinyint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressTinyint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsCompressSmallint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressSmallint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg,
void *pBuf, int32_t nBuf);
int32_t tsCompressInt(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressInt(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsCompressBigint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressBigint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg, void *pBuf,
int32_t nBuf);
2023-11-12 16:43:13 +00:00
// for internal usage
int32_t getWordLength(char type);
2024-03-15 10:22:57 +00:00
int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, char *const output, const char type);
int32_t tsDecompressFloatImpAvx2(const char *input, int32_t nelements, char *output);
int32_t tsDecompressDoubleImpAvx2(const char *input, int32_t nelements, char *output);
int32_t tsDecompressTimestampAvx2(const char *input, int32_t nelements, char *output, bool bigEndian);
int32_t tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output,
bool bigEndian);
2024-03-15 10:22:57 +00:00
/*************************************************************************
* REGULAR COMPRESSION 2
*************************************************************************/
int32_t tsCompressTimestamp2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
int32_t tsDecompressTimestamp2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
int32_t tsCompressFloat2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressFloat2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsCompressDouble2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg, void *pBuf,
int32_t nBuf);
2024-03-18 12:12:55 +00:00
int32_t tsDecompressDouble2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
2024-03-15 10:22:57 +00:00
int32_t tsCompressString2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg, void *pBuf,
int32_t nBuf);
2024-03-18 12:12:55 +00:00
int32_t tsDecompressString2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
2024-03-15 10:22:57 +00:00
int32_t tsCompressBool2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressBool2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsCompressTinyint2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressTinyint2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
2024-03-18 12:12:55 +00:00
int32_t tsCompressSmallint2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
2024-03-15 10:22:57 +00:00
int32_t tsDecompressSmallint2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
int32_t tsCompressInt2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsDecompressInt2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg, void *pBuf,
int32_t nBuf);
int32_t tsCompressBigint2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg, void *pBuf,
int32_t nBuf);
2024-03-18 12:12:55 +00:00
int32_t tsDecompressBigint2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
feat(decimal): support decimal data type (#30060) * decimal: create table * decimal: add test case decimal.py * decimal: add decimal.c * support input decimal * decimal test * refactor svalue * fix test cases * add decimal unit test * add decimal test cmake * support insert and query decimal type * define wide integer, support decimal128 * support decimal128 divide * set decimal type expr res types * scalar decimal * convert to decimal * fix decimal64/128 from str and to str * fix decimal from str and decimal to str * decimal simple conversion * unit test for decimal * decimal conversion and unit tests * decimal + - * / * decimal scalar ops and comparision * start to refactor GET_TYPED_DATA * support decimal max func, cast func * refactor GET_TYPED_DATA interface * decimal scalar comparision * start to implement sum for decimal * support sum and avg for decimal type * decimal tests * add decimal test * decimal add test cases * decimal use int256/int128 * decimal testing * fix decimal table meta and add tests for decimal col streams * fix create stream and create tsma * test insert decimal values * decimal from str * test decimal input * test parse decimal from string * add taos_fetch_field_e api * decimal insert tests * test decimal operators * decimal operator test * feat:support decimal in raw block * decimal operator tests * decimal test * feat:support decimal in raw block * feat:support decimal in raw block * feat:add schemaExt to SMqDataRsp * feat:remove add schemaExt to SMqDataRsp * feat:remove add schemaExt to SMqDataRsp * feat:remove add schemaExt to SMqDataRsp * decimal test operators * decimal operator test * test decimal operators * test decimal compare operators * decimal unary operator test * decimal col with decimal col oper test * test decimal col filtering * fix decimal float operator test * decimal test where filtering * fix decimal filtering * fix decimal order by * fix decimal op test * test decimal agg funcs * test decimal functions * remove assert * fix ci build for ret check * fix decimal windows build * fix ci ret check * skip decimal ret check * skip decimal ret check * fix decimal tests * fix decimal ci test * decimal test * fix(tmq): heap user after free * fix(tmq): double free * fix(tmq): double free * fix decimal tests * fix(decimal): decimal test ci build * fix(decimal): windows build * fix(decimal): decimal test build * fix(decimal): fix decimal build and tests * fix(decimal): fix decimal tests * fix(decimal): fix taos_fetch_fields_e api * fix(decimal): fix decimal taos_fetch_fields_e api * fix(decimal): rebase 3.0 * fix(decimal): fix decimal functions * fix(decimal): fix decimal test case memory leak * fix(decimal): fix decimal tests * fix(decimal): fix decimal test case * fix(decimal): fix decimal tests * feat(decimal): fix unit tests * feat(decimal): fix deicmal unit test --------- Co-authored-by: wangmm0220 <wangmm0220@gmail.com> Co-authored-by: yihaoDeng <yhdeng@taosdata.com>
2025-03-14 10:08:07 +00:00
int32_t tsCompressDecimal64(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
int32_t tsDecompressDecimal64(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
int32_t tsCompressDecimal128(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
int32_t tsDecompressDecimal128(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint32_t cmprAlg,
void *pBuf, int32_t nBuf);
2019-07-11 08:36:16 +00:00
2022-09-20 05:39:32 +00:00
/*************************************************************************
* STREAM COMPRESSION
*************************************************************************/
typedef struct SCompressor SCompressor;
int32_t tCompressorCreate(SCompressor **ppCmprsor);
int32_t tCompressorDestroy(SCompressor *pCmprsor);
2022-09-26 02:47:24 +00:00
int32_t tCompressStart(SCompressor *pCmprsor, int8_t type, int8_t cmprAlg);
2022-09-27 09:36:02 +00:00
int32_t tCompressEnd(SCompressor *pCmprsor, const uint8_t **ppOut, int32_t *nOut, int32_t *nOrigin);
2022-09-20 05:39:32 +00:00
int32_t tCompress(SCompressor *pCmprsor, const void *pData, int64_t nData);
2024-02-28 07:58:24 +00:00
typedef int32_t (*__data_compress_init)(char *lossyColumns, float fPrecision, double dPrecision, uint32_t maxIntervals,
uint32_t intervals, int32_t ifAdtFse, const char *compressor);
typedef int32_t (*__data_compress_l1_fn_t)(const char *const input, const int32_t nelements, char *const output,
const char type);
typedef int32_t (*__data_decompress_l1_fn_t)(const char *const input, int32_t ninput, const int32_t nelements,
char *const output, const char type);
2024-02-28 07:58:24 +00:00
typedef int32_t (*__data_compress_l2_fn_t)(const char *const input, const int32_t nelements, char *const output,
2024-03-24 08:15:01 +00:00
int32_t outputSize, const char type, int8_t level);
2024-02-28 07:58:24 +00:00
typedef int32_t (*__data_decompress_l2_fn_t)(const char *const input, const int32_t nelements, char *const output,
2024-02-29 10:40:59 +00:00
int32_t outputSize, const char type);
2024-02-28 07:58:24 +00:00
2024-02-28 12:16:22 +00:00
typedef struct {
2024-03-24 05:35:07 +00:00
char *name;
2024-02-28 12:16:22 +00:00
__data_compress_init initFn;
2024-02-29 10:40:59 +00:00
__data_compress_l1_fn_t comprFn;
__data_decompress_l1_fn_t decomprFn;
2024-04-22 03:56:45 +00:00
} TCmprL1FnSet;
2024-02-28 12:16:22 +00:00
typedef struct {
2024-03-24 05:35:07 +00:00
char *name;
2024-02-28 12:16:22 +00:00
__data_compress_init initFn;
2024-02-29 10:40:59 +00:00
__data_compress_l2_fn_t comprFn;
__data_decompress_l2_fn_t decomprFn;
2024-04-22 03:56:45 +00:00
} TCmprL2FnSet;
2024-02-28 12:16:22 +00:00
2024-04-22 03:56:45 +00:00
typedef enum {
2024-03-27 05:49:13 +00:00
L1_UNKNOWN = 0,
2024-02-29 10:40:59 +00:00
L1_SIMPLE_8B,
L1_XOR,
L1_RLE,
2024-03-28 11:56:44 +00:00
L1_DELTAD,
2025-08-26 06:46:03 +00:00
L1_BSS,
2024-03-26 12:44:53 +00:00
L1_DISABLED = 0xFF,
2024-04-22 03:56:45 +00:00
} TCmprL1Type;
2024-02-29 10:40:59 +00:00
2024-04-22 03:56:45 +00:00
typedef enum {
2024-03-27 05:49:13 +00:00
L2_UNKNOWN = 0,
2024-02-29 10:40:59 +00:00
L2_LZ4,
L2_ZLIB,
L2_ZSTD,
L2_TSZ,
L2_XZ,
2024-03-26 12:44:53 +00:00
L2_DISABLED = 0xFF,
2024-04-22 03:56:45 +00:00
} TCmprL2Type;
typedef enum {
L2_LVL_NOCHANGE = 0,
L2_LVL_LOW,
L2_LVL_MEDIUM,
L2_LVL_HIGH,
L2_LVL_DISABLED = 0xFF,
} TCmprLvlType;
typedef struct {
char *name;
uint8_t lvl[3]; // l[0] = 'low', l[1] = 'mid', l[2] = 'high'
} TCmprLvlSet;
2024-02-29 10:40:59 +00:00
2024-09-23 10:02:25 +00:00
void tcompressDebug(uint32_t cmprAlg, uint8_t *l1Alg, uint8_t *l2Alg, uint8_t *level);
2024-03-18 12:12:55 +00:00
#define DEFINE_VAR(cmprAlg) \
uint8_t l1 = COMPRESS_L1_TYPE_U32(cmprAlg); \
uint8_t l2 = COMPRESS_L2_TYPE_U32(cmprAlg); \
uint8_t lvl = COMPRESS_L2_TYPE_LEVEL_U32(cmprAlg);
2024-03-26 08:50:21 +00:00
#define SET_COMPRESS(l1, l2, lvl, cmpr) \
do { \
(cmpr) &= 0x00FFFFFF; \
(cmpr) |= ((l1) << 24); \
(cmpr) &= 0xFF0000FF; \
(cmpr) |= ((l2) << 8); \
(cmpr) &= 0xFFFFFF00; \
(cmpr) |= (lvl); \
} while (0)
2024-03-26 12:44:53 +00:00
int8_t tUpdateCompress(uint32_t oldCmpr, uint32_t newCmpr, uint8_t l2Disabled, uint8_t lvlDisabled, uint8_t lvlDefault,
uint32_t *dst);
2019-07-11 08:36:16 +00:00
#ifdef __cplusplus
}
#endif
2025-07-17 06:17:47 +00:00
int32_t plainCompressImpl(void *src, int32_t srcSize, void *dst, int32_t *dstSize);
int32_t plainDecompressImpl(void *src, int32_t srcSize, void *dst, int32_t *dstSize);
int32_t lz4CompressImpl(void *src, int32_t srcSize, void *dst, int32_t *dstSize);
int32_t lz4DecompressImpl(void *src, int32_t srcSize, void *dst, int32_t *dstSize);
int32_t zlibCompressImpl(void *src, int32_t srcSize, void *dst, int32_t *dstSize);
int32_t zlibDecompressImpl(void *src, int32_t srcSize, void *dst, int32_t *dstSize);
int32_t zstdCompressImpl(void *src, int32_t srcSize, void *dst, int32_t *dstSize);
int32_t zstdDecompressImpl(void *src, int32_t srcSize, void *dst, int32_t *dstSize);
int32_t xzCompressImpl(void *src, int32_t srcSize, void *dst, int32_t *dstSize);
int32_t xzDecompressImpl(void *src, int32_t srcSize, void *dst, int32_t *dstSize);
#endif /*_TD_UTIL_COMPRESSION_H_*/