Add module macros
This commit is contained in:
parent
b5e3e3c9a8
commit
b1b582b9fa
@ -49,7 +49,6 @@
|
||||
#define ZSTD_VERSION_STRING ZSTD_EXPAND_AND_QUOTE(ZSTD_LIB_VERSION)
|
||||
|
||||
#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE)
|
||||
ZSTDLIB_API unsigned ZSTD_versionNumber(void); /**< library version number; to be used when checking dll version */
|
||||
|
||||
|
||||
/*====== Helper functions ======*/
|
||||
@ -123,7 +122,6 @@ typedef struct {
|
||||
} ZSTD_parameters;
|
||||
|
||||
size_t ZSTD_CCtxWorkspaceBound(ZSTD_compressionParameters params);
|
||||
size_t ZSTD_DCtxWorkspaceBound(void);
|
||||
|
||||
/*= Compression context
|
||||
* When compressing many times,
|
||||
@ -139,6 +137,8 @@ ZSTDLIB_API size_t ZSTD_compressCCtx(ZSTD_CCtx* ctx, void* dst, size_t dstCapaci
|
||||
|
||||
ZSTDLIB_API size_t ZSTD_compress_usingDict(ZSTD_CCtx* ctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize, const void *dict, size_t dictSize, ZSTD_parameters params);
|
||||
|
||||
size_t ZSTD_DCtxWorkspaceBound(void);
|
||||
|
||||
/*= Decompression context
|
||||
* When decompressing many times,
|
||||
* it is recommended to allocate a context just once, and re-use it for each successive compression operation.
|
||||
@ -157,7 +157,6 @@ ZSTDLIB_API size_t ZSTD_decompress_usingDict(ZSTD_DCtx* ctx, void* dst, size_t d
|
||||
* Fast dictionary API
|
||||
****************************/
|
||||
size_t ZSTD_CDictWorkspaceBound(ZSTD_compressionParameters params);
|
||||
size_t ZSTD_DDictWorkspaceBound(void);
|
||||
|
||||
typedef struct ZSTD_CDict_s ZSTD_CDict;
|
||||
|
||||
@ -178,6 +177,8 @@ ZSTDLIB_API size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx,
|
||||
const ZSTD_CDict* cdict);
|
||||
|
||||
|
||||
size_t ZSTD_DDictWorkspaceBound(void);
|
||||
|
||||
typedef struct ZSTD_DDict_s ZSTD_DDict;
|
||||
|
||||
/*! ZSTD_createDDict() :
|
||||
@ -252,7 +253,6 @@ typedef struct ZSTD_outBuffer_s {
|
||||
* *******************************************************************/
|
||||
|
||||
size_t ZSTD_CStreamWorkspaceBound(ZSTD_compressionParameters params);
|
||||
size_t ZSTD_DStreamWorkspaceBound(size_t maxWindowSize);
|
||||
|
||||
typedef struct ZSTD_CStream_s ZSTD_CStream;
|
||||
/*===== ZSTD_CStream management functions =====*/
|
||||
@ -292,6 +292,8 @@ ZSTDLIB_API size_t ZSTD_CStreamOutSize(void); /**< recommended size for output
|
||||
* The return value is a suggested next input size (a hint to improve latency) that will never load more than the current frame.
|
||||
* *******************************************************************************/
|
||||
|
||||
size_t ZSTD_DStreamWorkspaceBound(size_t maxWindowSize);
|
||||
|
||||
typedef struct ZSTD_DStream_s ZSTD_DStream;
|
||||
/*===== ZSTD_DStream management functions =====*/
|
||||
ZSTDLIB_API ZSTD_DStream* ZSTD_createDStream(size_t maxWindowSize, void* workspace, size_t workspaceSize);
|
||||
|
@ -17,12 +17,6 @@
|
||||
#include <linux/kernel.h>
|
||||
|
||||
|
||||
/*-****************************************
|
||||
* Version
|
||||
******************************************/
|
||||
unsigned ZSTD_versionNumber (void) { return ZSTD_VERSION_NUMBER; }
|
||||
|
||||
|
||||
/*=**************************************************************
|
||||
* Custom allocator
|
||||
****************************************************************/
|
||||
|
@ -12,6 +12,7 @@
|
||||
* Dependencies
|
||||
***************************************/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/string.h> /* memset */
|
||||
#include "mem.h"
|
||||
#include "fse.h"
|
||||
@ -3337,3 +3338,44 @@ ZSTD_parameters ZSTD_getParams(int compressionLevel, unsigned long long srcSize,
|
||||
params.cParams = cParams;
|
||||
return params;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_maxCLevel);
|
||||
EXPORT_SYMBOL(ZSTD_compressBound);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_CCtxWorkspaceBound);
|
||||
EXPORT_SYMBOL(ZSTD_createCCtx);
|
||||
EXPORT_SYMBOL(ZSTD_compressCCtx);
|
||||
EXPORT_SYMBOL(ZSTD_compress_usingDict);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_CDictWorkspaceBound);
|
||||
EXPORT_SYMBOL(ZSTD_createCDict);
|
||||
EXPORT_SYMBOL(ZSTD_compress_usingCDict);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_CStreamWorkspaceBound);
|
||||
EXPORT_SYMBOL(ZSTD_createCStream);
|
||||
EXPORT_SYMBOL(ZSTD_createCStream_usingCDict);
|
||||
EXPORT_SYMBOL(ZSTD_resetCStream);
|
||||
EXPORT_SYMBOL(ZSTD_compressStream);
|
||||
EXPORT_SYMBOL(ZSTD_flushStream);
|
||||
EXPORT_SYMBOL(ZSTD_endStream);
|
||||
EXPORT_SYMBOL(ZSTD_CStreamInSize);
|
||||
EXPORT_SYMBOL(ZSTD_CStreamOutSize);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_getCParams);
|
||||
EXPORT_SYMBOL(ZSTD_getParams);
|
||||
EXPORT_SYMBOL(ZSTD_checkCParams);
|
||||
EXPORT_SYMBOL(ZSTD_adjustCParams);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_compressBegin);
|
||||
EXPORT_SYMBOL(ZSTD_compressBegin_usingDict);
|
||||
EXPORT_SYMBOL(ZSTD_compressBegin_advanced);
|
||||
EXPORT_SYMBOL(ZSTD_copyCCtx);
|
||||
EXPORT_SYMBOL(ZSTD_compressBegin_usingCDict);
|
||||
EXPORT_SYMBOL(ZSTD_compressContinue);
|
||||
EXPORT_SYMBOL(ZSTD_compressEnd);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_getBlockSizeMax);
|
||||
EXPORT_SYMBOL(ZSTD_compressBlock);
|
||||
|
||||
MODULE_LICENSE("BSD");
|
||||
MODULE_DESCRIPTION("Zstd Compressor");
|
||||
|
@ -24,6 +24,8 @@
|
||||
/*-*******************************************************
|
||||
* Dependencies
|
||||
*********************************************************/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/string.h> /* memcpy, memmove, memset */
|
||||
#include "mem.h" /* low level memory routines */
|
||||
#include "fse.h"
|
||||
@ -2333,3 +2335,43 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
|
||||
return nextSrcSizeHint;
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_DCtxWorkspaceBound);
|
||||
EXPORT_SYMBOL(ZSTD_createDCtx);
|
||||
EXPORT_SYMBOL(ZSTD_decompressDCtx);
|
||||
EXPORT_SYMBOL(ZSTD_decompress_usingDict);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_DDictWorkspaceBound);
|
||||
EXPORT_SYMBOL(ZSTD_createDDict);
|
||||
EXPORT_SYMBOL(ZSTD_decompress_usingDDict);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_DStreamWorkspaceBound);
|
||||
EXPORT_SYMBOL(ZSTD_createDStream);
|
||||
EXPORT_SYMBOL(ZSTD_createDStream_usingDDict);
|
||||
EXPORT_SYMBOL(ZSTD_resetDStream);
|
||||
EXPORT_SYMBOL(ZSTD_decompressStream);
|
||||
EXPORT_SYMBOL(ZSTD_DStreamInSize);
|
||||
EXPORT_SYMBOL(ZSTD_DStreamOutSize);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_findFrameCompressedSize);
|
||||
EXPORT_SYMBOL(ZSTD_getFrameContentSize);
|
||||
EXPORT_SYMBOL(ZSTD_findDecompressedSize);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_isFrame);
|
||||
EXPORT_SYMBOL(ZSTD_getDictID_fromDict);
|
||||
EXPORT_SYMBOL(ZSTD_getDictID_fromDDict);
|
||||
EXPORT_SYMBOL(ZSTD_getDictID_fromFrame);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_getFrameParams);
|
||||
EXPORT_SYMBOL(ZSTD_decompressBegin);
|
||||
EXPORT_SYMBOL(ZSTD_decompressBegin_usingDict);
|
||||
EXPORT_SYMBOL(ZSTD_copyDCtx);
|
||||
EXPORT_SYMBOL(ZSTD_nextSrcSizeToDecompress);
|
||||
EXPORT_SYMBOL(ZSTD_decompressContinue);
|
||||
EXPORT_SYMBOL(ZSTD_nextInputType);
|
||||
|
||||
EXPORT_SYMBOL(ZSTD_decompressBlock);
|
||||
EXPORT_SYMBOL(ZSTD_insertBlock);
|
||||
|
||||
MODULE_LICENSE("BSD");
|
||||
MODULE_DESCRIPTION("Zstd Decompressor");
|
||||
|
Loading…
Reference in New Issue
Block a user