10#if defined (__cplusplus)
23#ifndef ZSTDLIB_VISIBLE
25# ifdef ZSTDLIB_VISIBILITY
26# define ZSTDLIB_VISIBLE ZSTDLIB_VISIBILITY
27# elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
28# define ZSTDLIB_VISIBLE __attribute__ ((visibility ("default")))
30# define ZSTDLIB_VISIBLE
35# if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
36# define ZSTDLIB_HIDDEN __attribute__ ((visibility ("hidden")))
38# define ZSTDLIB_HIDDEN
42#if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
43# define ZSTDLIB_API __declspec(dllexport) ZSTDLIB_VISIBLE
44#elif defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)
45# define ZSTDLIB_API __declspec(dllimport) ZSTDLIB_VISIBLE
47# define ZSTDLIB_API ZSTDLIB_VISIBLE
55#ifdef ZSTD_DISABLE_DEPRECATE_WARNINGS
56# define ZSTD_DEPRECATED(message)
58# if defined (__cplusplus) && (__cplusplus >= 201402)
59# define ZSTD_DEPRECATED(message) [[deprecated(message)]]
60# elif (defined(GNUC) && (GNUC > 4 || (GNUC == 4 && GNUC_MINOR >= 5))) || defined(__clang__)
61# define ZSTD_DEPRECATED(message) __attribute__((deprecated(message)))
62# elif defined(__GNUC__) && (__GNUC__ >= 3)
63# define ZSTD_DEPRECATED(message) __attribute__((deprecated))
64# elif defined(_MSC_VER)
65# define ZSTD_DEPRECATED(message) __declspec(deprecated(message))
67# pragma message("WARNING: You need to implement ZSTD_DEPRECATED for this compiler")
68# define ZSTD_DEPRECATED(message)
107#define ZSTD_VERSION_MAJOR 1
108#define ZSTD_VERSION_MINOR 5
109#define ZSTD_VERSION_RELEASE 6
110#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE)
116#define ZSTD_LIB_VERSION ZSTD_VERSION_MAJOR.ZSTD_VERSION_MINOR.ZSTD_VERSION_RELEASE
117#define ZSTD_QUOTE(str) #str
118#define ZSTD_EXPAND_AND_QUOTE(str) ZSTD_QUOTE(str)
119#define ZSTD_VERSION_STRING ZSTD_EXPAND_AND_QUOTE(ZSTD_LIB_VERSION)
128#ifndef ZSTD_CLEVEL_DEFAULT
129# define ZSTD_CLEVEL_DEFAULT 3
137#define ZSTD_MAGICNUMBER 0xFD2FB528
138#define ZSTD_MAGIC_DICTIONARY 0xEC30A437
139#define ZSTD_MAGIC_SKIPPABLE_START 0x184D2A50
140#define ZSTD_MAGIC_SKIPPABLE_MASK 0xFFFFFFF0
142#define ZSTD_BLOCKSIZELOG_MAX 17
143#define ZSTD_BLOCKSIZE_MAX (1<<ZSTD_BLOCKSIZELOG_MAX)
156 const void* src,
size_t srcSize,
157 int compressionLevel);
166 const void* src,
size_t compressedSize);
191#define ZSTD_CONTENTSIZE_UNKNOWN (0ULL - 1)
192#define ZSTD_CONTENTSIZE_ERROR (0ULL - 2)
231#define ZSTD_MAX_INPUT_SIZE ((sizeof(size_t)==8) ? 0xFF00FF00FF00FF00ULL : 0xFF00FF00U)
232#define ZSTD_COMPRESSBOUND(srcSize) (((size_t)(srcSize) >= ZSTD_MAX_INPUT_SIZE) ? 0 : (srcSize) + ((srcSize)>>8) + (((srcSize) < (128<<10)) ? (((128<<10) - (srcSize)) >> 11) : 0))
272 void* dst,
size_t dstCapacity,
273 const void* src,
size_t srcSize,
274 int compressionLevel);
292 void* dst,
size_t dstCapacity,
293 const void* src,
size_t srcSize);
601 void* dst,
size_t dstCapacity,
602 const void* src,
size_t srcSize);
936 void* dst,
size_t dstCapacity,
937 const void* src,
size_t srcSize,
938 const void* dict,
size_t dictSize,
939 int compressionLevel);
948 void* dst,
size_t dstCapacity,
949 const void* src,
size_t srcSize,
950 const void* dict,
size_t dictSize);
984 void* dst,
size_t dstCapacity,
985 const void* src,
size_t srcSize,
1005 void* dst,
size_t dstCapacity,
1006 const void* src,
size_t srcSize,
1115 const void* prefix,
size_t prefixSize);
1170 const void* prefix,
size_t prefixSize);
1196#if defined(ZSTD_STATIC_LINKING_ONLY) && !defined(ZSTD_H_ZSTD_STATIC_LINKING_ONLY)
1197#define ZSTD_H_ZSTD_STATIC_LINKING_ONLY
1200#ifndef ZSTDLIB_STATIC_API
1201# if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
1202# define ZSTDLIB_STATIC_API __declspec(dllexport) ZSTDLIB_VISIBLE
1203# elif defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)
1204# define ZSTDLIB_STATIC_API __declspec(dllimport) ZSTDLIB_VISIBLE
1206# define ZSTDLIB_STATIC_API ZSTDLIB_VISIBLE
1220#define ZSTD_FRAMEHEADERSIZE_PREFIX(format) ((format) == ZSTD_f_zstd1 ? 5 : 1)
1221#define ZSTD_FRAMEHEADERSIZE_MIN(format) ((format) == ZSTD_f_zstd1 ? 6 : 2)
1222#define ZSTD_FRAMEHEADERSIZE_MAX 18
1223#define ZSTD_SKIPPABLEHEADERSIZE 8
1226#define ZSTD_WINDOWLOG_MAX_32 30
1227#define ZSTD_WINDOWLOG_MAX_64 31
1228#define ZSTD_WINDOWLOG_MAX ((int)(sizeof(size_t) == 4 ? ZSTD_WINDOWLOG_MAX_32 : ZSTD_WINDOWLOG_MAX_64))
1229#define ZSTD_WINDOWLOG_MIN 10
1230#define ZSTD_HASHLOG_MAX ((ZSTD_WINDOWLOG_MAX < 30) ? ZSTD_WINDOWLOG_MAX : 30)
1231#define ZSTD_HASHLOG_MIN 6
1232#define ZSTD_CHAINLOG_MAX_32 29
1233#define ZSTD_CHAINLOG_MAX_64 30
1234#define ZSTD_CHAINLOG_MAX ((int)(sizeof(size_t) == 4 ? ZSTD_CHAINLOG_MAX_32 : ZSTD_CHAINLOG_MAX_64))
1235#define ZSTD_CHAINLOG_MIN ZSTD_HASHLOG_MIN
1236#define ZSTD_SEARCHLOG_MAX (ZSTD_WINDOWLOG_MAX-1)
1237#define ZSTD_SEARCHLOG_MIN 1
1238#define ZSTD_MINMATCH_MAX 7
1239#define ZSTD_MINMATCH_MIN 3
1240#define ZSTD_TARGETLENGTH_MAX ZSTD_BLOCKSIZE_MAX
1241#define ZSTD_TARGETLENGTH_MIN 0
1242#define ZSTD_STRATEGY_MIN ZSTD_fast
1243#define ZSTD_STRATEGY_MAX ZSTD_btultra2
1244#define ZSTD_BLOCKSIZE_MAX_MIN (1 << 10)
1247#define ZSTD_OVERLAPLOG_MIN 0
1248#define ZSTD_OVERLAPLOG_MAX 9
1250#define ZSTD_WINDOWLOG_LIMIT_DEFAULT 27
1258#define ZSTD_LDM_HASHLOG_MIN ZSTD_HASHLOG_MIN
1259#define ZSTD_LDM_HASHLOG_MAX ZSTD_HASHLOG_MAX
1260#define ZSTD_LDM_MINMATCH_MIN 4
1261#define ZSTD_LDM_MINMATCH_MAX 4096
1262#define ZSTD_LDM_BUCKETSIZELOG_MIN 1
1263#define ZSTD_LDM_BUCKETSIZELOG_MAX 8
1264#define ZSTD_LDM_HASHRATELOG_MIN 0
1265#define ZSTD_LDM_HASHRATELOG_MAX (ZSTD_WINDOWLOG_MAX - ZSTD_HASHLOG_MIN)
1268#define ZSTD_TARGETCBLOCKSIZE_MIN 1340
1269#define ZSTD_TARGETCBLOCKSIZE_MAX ZSTD_BLOCKSIZE_MAX
1270#define ZSTD_SRCSIZEHINT_MIN 0
1271#define ZSTD_SRCSIZEHINT_MAX INT_MAX
1279 unsigned int offset;
1284 unsigned int litLength;
1285 unsigned int matchLength;
1321 unsigned targetLength;
1323} ZSTD_compressionParameters;
1326 int contentSizeFlag;
1329} ZSTD_frameParameters;
1332 ZSTD_compressionParameters cParams;
1333 ZSTD_frameParameters fParams;
1338 ZSTD_dct_rawContent = 1,
1339 ZSTD_dct_fullDict = 2
1340} ZSTD_dictContentType_e;
1343 ZSTD_dlm_byCopy = 0,
1345} ZSTD_dictLoadMethod_e;
1349 ZSTD_f_zstd1_magicless = 1
1356 ZSTD_d_validateChecksum = 0,
1357 ZSTD_d_ignoreChecksum = 1
1358} ZSTD_forceIgnoreChecksum_e;
1362 ZSTD_rmd_refSingleDDict = 0,
1363 ZSTD_rmd_refMultipleDDicts = 1
1364} ZSTD_refMultipleDDicts_e;
1399 ZSTD_dictDefaultAttach = 0,
1400 ZSTD_dictForceAttach = 1,
1401 ZSTD_dictForceCopy = 2,
1402 ZSTD_dictForceLoad = 3
1403} ZSTD_dictAttachPref_e;
1409 ZSTD_lcm_huffman = 1,
1411 ZSTD_lcm_uncompressed = 2
1412} ZSTD_literalCompressionMode_e;
1422} ZSTD_paramSwitch_e;
1472typedef enum { ZSTD_frame, ZSTD_skippableFrame } ZSTD_frameType_e;
1474 unsigned long long frameContentSize;
1475 unsigned long long windowSize;
1476 unsigned blockSizeMax;
1477 ZSTD_frameType_e frameType;
1478 unsigned headerSize;
1480 unsigned checksumFlag;
1481 unsigned _reserved1;
1482 unsigned _reserved2;
1490ZSTDLIB_STATIC_API
size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr,
const void* src,
size_t srcSize);
1494ZSTDLIB_STATIC_API
size_t ZSTD_getFrameHeader_advanced(ZSTD_frameHeader* zfhPtr,
const void* src,
size_t srcSize, ZSTD_format_e format);
1534#define ZSTD_DECOMPRESSION_MARGIN(originalSize, blockSize) ((size_t)( \
1535 ZSTD_FRAMEHEADERSIZE_MAX + \
1537 ((originalSize) == 0 ? 0 : 3 * (((originalSize) + (blockSize) - 1) / blockSize)) + \
1542 ZSTD_sf_noBlockDelimiters = 0,
1543 ZSTD_sf_explicitBlockDelimiters = 1
1544} ZSTD_sequenceFormat_e;
1583ZSTD_DEPRECATED(
"For debugging only, will be replaced by ZSTD_extractSequences()")
1584ZSTDLIB_STATIC_API
size_t
1586 ZSTD_Sequence* outSeqs,
size_t outSeqsSize,
1587 const
void* src,
size_t srcSize);
1632ZSTDLIB_STATIC_API
size_t
1634 const ZSTD_Sequence* inSeqs,
size_t inSeqsSize,
1635 const
void* src,
size_t srcSize);
1652 const
void* src,
size_t srcSize,
unsigned magicVariant);
1666 const
void* src,
size_t srcSize);
1774 void* workspace,
size_t workspaceSize,
1775 const
void* dict,
size_t dictSize,
1776 ZSTD_dictLoadMethod_e dictLoadMethod,
1777 ZSTD_dictContentType_e dictContentType,
1778 ZSTD_compressionParameters cParams);
1781 void* workspace,
size_t workspaceSize,
1782 const
void* dict,
size_t dictSize,
1783 ZSTD_dictLoadMethod_e dictLoadMethod,
1784 ZSTD_dictContentType_e dictContentType);
1792typedef
void* (*ZSTD_allocFunction) (
void* opaque,
size_t size);
1793typedef
void (*ZSTD_freeFunction) (
void* opaque,
void* address);
1794typedef struct { ZSTD_allocFunction customAlloc; ZSTD_freeFunction customFree;
void* opaque; } ZSTD_customMem;
1797__attribute__((__unused__))
1799ZSTD_customMem
const ZSTD_defaultCMem = { NULL, NULL, NULL };
1807 ZSTD_dictLoadMethod_e dictLoadMethod,
1808 ZSTD_dictContentType_e dictContentType,
1809 ZSTD_compressionParameters cParams,
1810 ZSTD_customMem customMem);
1823ZSTDLIB_STATIC_API ZSTD_threadPool* ZSTD_createThreadPool(
size_t numThreads);
1824ZSTDLIB_STATIC_API
void ZSTD_freeThreadPool (ZSTD_threadPool* pool);
1832 const void* dict,
size_t dictSize,
1833 ZSTD_dictLoadMethod_e dictLoadMethod,
1834 ZSTD_dictContentType_e dictContentType,
1835 const ZSTD_CCtx_params* cctxParams,
1836 ZSTD_customMem customMem);
1839 const void* dict,
size_t dictSize,
1840 ZSTD_dictLoadMethod_e dictLoadMethod,
1841 ZSTD_dictContentType_e dictContentType,
1842 ZSTD_customMem customMem);
1860ZSTDLIB_STATIC_API ZSTD_compressionParameters
ZSTD_getCParams(
int compressionLevel,
unsigned long long estimatedSrcSize,
size_t dictSize);
1865ZSTDLIB_STATIC_API ZSTD_parameters
ZSTD_getParams(
int compressionLevel,
unsigned long long estimatedSrcSize,
size_t dictSize);
1878ZSTDLIB_STATIC_API ZSTD_compressionParameters
ZSTD_adjustCParams(ZSTD_compressionParameters cPar,
unsigned long long srcSize,
size_t dictSize);
1908 void* dst,
size_t dstCapacity,
1909 const
void* src,
size_t srcSize,
1910 const
void* dict,
size_t dictSize,
1911 ZSTD_parameters params);
1920 void* dst,
size_t dstCapacity,
1921 const
void* src,
size_t srcSize,
1923 ZSTD_frameParameters fParams);
1962 #define ZSTD_c_rsyncable ZSTD_c_experimentalParam1
1967#define ZSTD_c_format ZSTD_c_experimentalParam2
1971#define ZSTD_c_forceMaxWindow ZSTD_c_experimentalParam3
1977#define ZSTD_c_forceAttachDict ZSTD_c_experimentalParam4
1989#define ZSTD_c_literalCompressionMode ZSTD_c_experimentalParam5
1995#define ZSTD_c_srcSizeHint ZSTD_c_experimentalParam7
2051#define ZSTD_c_enableDedicatedDictSearch ZSTD_c_experimentalParam8
2084#define ZSTD_c_stableInBuffer ZSTD_c_experimentalParam9
2104#define ZSTD_c_stableOutBuffer ZSTD_c_experimentalParam10
2115#define ZSTD_c_blockDelimiters ZSTD_c_experimentalParam11
2132#define ZSTD_c_validateSequences ZSTD_c_experimentalParam12
2143#define ZSTD_c_useBlockSplitter ZSTD_c_experimentalParam13
2155#define ZSTD_c_useRowMatchFinder ZSTD_c_experimentalParam14
2175#define ZSTD_c_deterministicRefPrefix ZSTD_c_experimentalParam15
2198#define ZSTD_c_prefetchCDictTables ZSTD_c_experimentalParam16
2212#define ZSTD_c_enableSeqProducerFallback ZSTD_c_experimentalParam17
2224#define ZSTD_c_maxBlockSize ZSTD_c_experimentalParam18
2248#define ZSTD_c_searchForExternalRepcodes ZSTD_c_experimentalParam19
2287ZSTDLIB_STATIC_API
size_t ZSTD_CCtxParams_init(ZSTD_CCtx_params* cctxParams,
int compressionLevel);
2320 ZSTD_CCtx* cctx,
const ZSTD_CCtx_params* params);
2330 void* dst,
size_t dstCapacity,
size_t* dstPos,
2331 const void* src,
size_t srcSize,
size_t* srcPos,
2344ZSTDLIB_STATIC_API
unsigned ZSTD_isFrame(
const void* buffer,
size_t size);
2392#define ZSTD_d_format ZSTD_d_experimentalParam1
2423#define ZSTD_d_stableOutBuffer ZSTD_d_experimentalParam2
2434#define ZSTD_d_forceIgnoreChecksum ZSTD_d_experimentalParam3
2457#define ZSTD_d_refMultipleDDicts ZSTD_d_experimentalParam4
2468#define ZSTD_d_disableHuffmanAssembly ZSTD_d_experimentalParam5
2484#define ZSTD_d_maxBlockSize ZSTD_d_experimentalParam6
2505 void* dst,
size_t dstCapacity,
size_t* dstPos,
2506 const
void* src,
size_t srcSize,
size_t* srcPos);
2533 int compressionLevel,
2534 unsigned long long pledgedSrcSize);
2551 const
void* dict,
size_t dictSize,
2552 int compressionLevel);
2569 const
void* dict,
size_t dictSize,
2570 ZSTD_parameters params,
2571 unsigned long long pledgedSrcSize);
2601 ZSTD_frameParameters fParams,
2602 unsigned long long pledgedSrcSize);
2628 unsigned long long ingested;
2631 unsigned long long flushed;
2632 unsigned currentJobID;
2633 unsigned nbActiveWorkers;
2634} ZSTD_frameProgression;
2670ZSTD_DEPRECATED(
"use ZSTD_DCtx_reset + ZSTD_DCtx_loadDictionary, see zstd.h for detailed instructions")
2819#define ZSTD_SEQUENCE_PRODUCER_ERROR ((size_t)(-1))
2821typedef size_t (*ZSTD_sequenceProducer_F) (
2822 void* sequenceProducerState,
2823 ZSTD_Sequence* outSeqs,
size_t outSeqsCapacity,
2824 const void* src,
size_t srcSize,
2825 const void* dict,
size_t dictSize,
2826 int compressionLevel,
2849ZSTDLIB_STATIC_API
void
2852 void* sequenceProducerState,
2853 ZSTD_sequenceProducer_F sequenceProducer
2865ZSTDLIB_STATIC_API
void
2867 ZSTD_CCtx_params* params,
2868 void* sequenceProducerState,
2869 ZSTD_sequenceProducer_F sequenceProducer
2917ZSTD_DEPRECATED(
"The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
2919ZSTD_DEPRECATED("The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
2921ZSTD_DEPRECATED("The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
2924ZSTD_DEPRECATED("This function will likely be removed in a future release. It is misleading and has very limited utility.")
2928ZSTD_DEPRECATED("The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
2930ZSTD_DEPRECATED("The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
2931ZSTDLIB_STATIC_API
size_t ZSTD_compressEnd(
ZSTD_CCtx* cctx,
void* dst,
size_t dstCapacity, const
void* src,
size_t srcSize);
3025ZSTD_DEPRECATED("This function will likely be removed in the next minor release. It is misleading and has very limited utility.")
3027typedef enum { ZSTDnit_frameHeader, ZSTDnit_blockHeader, ZSTDnit_block, ZSTDnit_lastBlock, ZSTDnit_checksum, ZSTDnit_skippableFrame } ZSTD_nextInputType_e;
3076ZSTD_DEPRECATED(
"The block API is deprecated in favor of the normal compression API. See docs.")
3078ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
3080ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
3082ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
3087#if defined (__cplusplus)
ZSTDLIB_API size_t ZSTD_decompress(void *dst, size_t dstCapacity, const void *src, size_t compressedSize)
ZSTDLIB_API unsigned long long ZSTD_getDecompressedSize(const void *src, size_t srcSize)
ZSTDLIB_API size_t ZSTD_compressBound(size_t srcSize)
ZSTDLIB_API size_t ZSTD_decompressDCtx(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
ZSTDLIB_API size_t ZSTD_initCStream(ZSTD_CStream *zcs, int compressionLevel)
ZSTDLIB_API size_t ZSTD_decompress_usingDDict(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const ZSTD_DDict *ddict)
ZSTDLIB_API size_t ZSTD_compress(void *dst, size_t dstCapacity, const void *src, size_t srcSize, int compressionLevel)
struct ZSTD_inBuffer_s ZSTD_inBuffer
ZSTDLIB_API size_t ZSTD_DCtx_setParameter(ZSTD_DCtx *dctx, ZSTD_dParameter param, int value)
ZSTDLIB_API size_t ZSTD_initDStream(ZSTD_DStream *zds)
ZSTDLIB_API ZSTD_DDict * ZSTD_createDDict(const void *dictBuffer, size_t dictSize)
ZSTDLIB_API size_t ZSTD_CStreamInSize(void)
ZSTDLIB_API size_t ZSTD_compressCCtx(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, int compressionLevel)
ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx *cctx, const void *dict, size_t dictSize)
ZSTDLIB_API size_t ZSTD_sizeof_CStream(const ZSTD_CStream *zcs)
ZSTDLIB_API size_t ZSTD_compress2(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
@ ZSTD_c_experimentalParam18
@ ZSTD_c_experimentalParam2
@ ZSTD_c_experimentalParam8
@ ZSTD_c_experimentalParam19
@ ZSTD_c_experimentalParam16
@ ZSTD_c_experimentalParam14
@ ZSTD_c_experimentalParam4
@ ZSTD_c_targetCBlockSize
@ ZSTD_c_experimentalParam1
@ ZSTD_c_experimentalParam3
@ ZSTD_c_experimentalParam11
@ ZSTD_c_experimentalParam12
@ ZSTD_c_experimentalParam17
@ ZSTD_c_enableLongDistanceMatching
@ ZSTD_c_compressionLevel
@ ZSTD_c_experimentalParam9
@ ZSTD_c_experimentalParam5
@ ZSTD_c_ldmBucketSizeLog
@ ZSTD_c_experimentalParam7
@ ZSTD_c_experimentalParam13
@ ZSTD_c_experimentalParam15
@ ZSTD_c_experimentalParam10
ZSTDLIB_API size_t ZSTD_compressStream2(ZSTD_CCtx *cctx, ZSTD_outBuffer *output, ZSTD_inBuffer *input, ZSTD_EndDirective endOp)
ZSTDLIB_API size_t ZSTD_sizeof_DStream(const ZSTD_DStream *zds)
ZSTDLIB_API size_t ZSTD_freeDCtx(ZSTD_DCtx *dctx)
ZSTDLIB_API size_t ZSTD_DStreamOutSize(void)
ZSTDLIB_API size_t ZSTD_DStreamInSize(void)
ZSTDLIB_API unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize)
ZSTDLIB_API size_t ZSTD_compress_usingCDict(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const ZSTD_CDict *cdict)
ZSTDLIB_API int ZSTD_minCLevel(void)
ZSTDLIB_API size_t ZSTD_compressStream(ZSTD_CStream *zcs, ZSTD_outBuffer *output, ZSTD_inBuffer *input)
ZSTDLIB_API size_t ZSTD_freeCCtx(ZSTD_CCtx *cctx)
ZSTDLIB_API size_t ZSTD_DCtx_refPrefix(ZSTD_DCtx *dctx, const void *prefix, size_t prefixSize)
ZSTDLIB_API size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize)
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, int compressionLevel)
ZSTDLIB_API ZSTD_DCtx * ZSTD_createDCtx(void)
ZSTDLIB_API size_t ZSTD_freeCDict(ZSTD_CDict *CDict)
ZSTDLIB_API int ZSTD_defaultCLevel(void)
@ ZSTD_d_experimentalParam1
@ ZSTD_d_experimentalParam3
@ ZSTD_d_experimentalParam5
@ ZSTD_d_experimentalParam6
@ ZSTD_d_experimentalParam2
@ ZSTD_d_experimentalParam4
ZSTDLIB_API size_t ZSTD_sizeof_DCtx(const ZSTD_DCtx *dctx)
ZSTDLIB_API size_t ZSTD_sizeof_CDict(const ZSTD_CDict *cdict)
ZSTDLIB_API unsigned ZSTD_getDictID_fromCDict(const ZSTD_CDict *cdict)
ZSTDLIB_API size_t ZSTD_freeCStream(ZSTD_CStream *zcs)
struct ZSTD_outBuffer_s ZSTD_outBuffer
ZSTDLIB_API size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx *dctx, const void *dict, size_t dictSize)
#define ZSTD_DEPRECATED(message)
ZSTDLIB_API size_t ZSTD_decompressStream(ZSTD_DStream *zds, ZSTD_outBuffer *output, ZSTD_inBuffer *input)
ZSTDLIB_API size_t ZSTD_DCtx_reset(ZSTD_DCtx *dctx, ZSTD_ResetDirective reset)
ZSTDLIB_API ZSTD_CDict * ZSTD_createCDict(const void *dictBuffer, size_t dictSize, int compressionLevel)
ZSTDLIB_API size_t ZSTD_freeDDict(ZSTD_DDict *ddict)
ZSTDLIB_API size_t ZSTD_sizeof_CCtx(const ZSTD_CCtx *cctx)
ZSTDLIB_API size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx *cctx, const void *prefix, size_t prefixSize)
ZSTDLIB_API size_t ZSTD_CCtx_setParameter(ZSTD_CCtx *cctx, ZSTD_cParameter param, int value)
ZSTDLIB_API size_t ZSTD_flushStream(ZSTD_CStream *zcs, ZSTD_outBuffer *output)
ZSTDLIB_API unsigned ZSTD_getDictID_fromDict(const void *dict, size_t dictSize)
ZSTDLIB_API const char * ZSTD_getErrorName(size_t code)
ZSTDLIB_API ZSTD_DStream * ZSTD_createDStream(void)
ZSTDLIB_API size_t ZSTD_decompress_usingDict(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const void *dict, size_t dictSize)
ZSTDLIB_API unsigned ZSTD_getDictID_fromFrame(const void *src, size_t srcSize)
ZSTDLIB_API ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter cParam)
ZSTDLIB_API unsigned ZSTD_getDictID_fromDDict(const ZSTD_DDict *ddict)
ZSTDLIB_API size_t ZSTD_CCtx_reset(ZSTD_CCtx *cctx, ZSTD_ResetDirective reset)
ZSTDLIB_API size_t ZSTD_CCtx_refCDict(ZSTD_CCtx *cctx, const ZSTD_CDict *cdict)
ZSTDLIB_API ZSTD_CStream * ZSTD_createCStream(void)
ZSTDLIB_API size_t ZSTD_endStream(ZSTD_CStream *zcs, ZSTD_outBuffer *output)
ZSTDLIB_API ZSTD_bounds ZSTD_dParam_getBounds(ZSTD_dParameter dParam)
@ ZSTD_reset_session_only
@ ZSTD_reset_session_and_parameters
ZSTDLIB_API size_t ZSTD_freeDStream(ZSTD_DStream *zds)
ZSTDLIB_API const char * ZSTD_versionString(void)
ZSTDLIB_API unsigned ZSTD_versionNumber(void)
ZSTDLIB_API size_t ZSTD_CStreamOutSize(void)
ZSTDLIB_API size_t ZSTD_DCtx_refDDict(ZSTD_DCtx *dctx, const ZSTD_DDict *ddict)
ZSTDLIB_API size_t ZSTD_sizeof_DDict(const ZSTD_DDict *ddict)
ZSTDLIB_API size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx *cctx, unsigned long long pledgedSrcSize)
ZSTDLIB_API ZSTD_CCtx * ZSTD_createCCtx(void)
ZSTDLIB_API int ZSTD_maxCLevel(void)
size_t ZSTD_compressBegin_usingDict(ZSTD_CCtx *cctx, const void *dict, size_t dictSize, int compressionLevel)
size_t ZSTD_compressStream2_simpleArgs(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, size_t *dstPos, const void *src, size_t srcSize, size_t *srcPos, ZSTD_EndDirective endOp)
size_t ZSTD_initCStream_usingCDict(ZSTD_CStream *zcs, const ZSTD_CDict *cdict)
void ZSTD_CCtxParams_registerSequenceProducer(ZSTD_CCtx_params *params, void *extSeqProdState, ZSTD_sequenceProducer_F extSeqProdFunc)
size_t ZSTD_getBlockSize(const ZSTD_CCtx *cctx)
size_t ZSTD_writeSkippableFrame(void *dst, size_t dstCapacity, const void *src, size_t srcSize, unsigned magicVariant)
ZSTD_CCtx * ZSTD_createCCtx_advanced(ZSTD_customMem customMem)
size_t ZSTD_estimateCCtxSize_usingCParams(ZSTD_compressionParameters cParams)
size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params *params)
size_t ZSTD_compressBegin(ZSTD_CCtx *cctx, int compressionLevel)
size_t ZSTD_compressBlock(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
size_t ZSTD_checkCParams(ZSTD_compressionParameters cParams)
size_t ZSTD_compressBegin_usingCDict(ZSTD_CCtx *cctx, const ZSTD_CDict *cdict)
size_t ZSTD_CCtx_setFParams(ZSTD_CCtx *cctx, ZSTD_frameParameters fparams)
ZSTD_CStream * ZSTD_initStaticCStream(void *workspace, size_t workspaceSize)
size_t ZSTD_estimateCStreamSize_usingCCtxParams(const ZSTD_CCtx_params *params)
size_t ZSTD_mergeBlockDelimiters(ZSTD_Sequence *sequences, size_t seqsSize)
size_t ZSTD_compressSequences(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const ZSTD_Sequence *inSeqs, size_t inSeqsSize, const void *src, size_t srcSize)
ZSTD_CDict * ZSTD_createCDict_byReference(const void *dict, size_t dictSize, int compressionLevel)
size_t ZSTD_estimateCCtxSize(int compressionLevel)
size_t ZSTD_CCtxParams_getParameter(ZSTD_CCtx_params const *CCtxParams, ZSTD_cParameter param, int *value)
ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize)
ZSTD_CCtx * ZSTD_initStaticCCtx(void *workspace, size_t workspaceSize)
size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream *zcs, const ZSTD_CDict *cdict, ZSTD_frameParameters fParams, unsigned long long pledgedSrcSize)
size_t ZSTD_estimateCDictSize_advanced(size_t dictSize, ZSTD_compressionParameters cParams, ZSTD_dictLoadMethod_e dictLoadMethod)
size_t ZSTD_CCtxParams_init(ZSTD_CCtx_params *cctxParams, int compressionLevel)
ZSTD_CCtx_params * ZSTD_createCCtxParams(void)
size_t ZSTD_CCtx_loadDictionary_byReference(ZSTD_CCtx *cctx, const void *dict, size_t dictSize)
void ZSTD_registerSequenceProducer(ZSTD_CCtx *zc, void *extSeqProdState, ZSTD_sequenceProducer_F extSeqProdFunc)
size_t ZSTD_sequenceBound(size_t srcSize)
size_t ZSTD_toFlushNow(ZSTD_CCtx *cctx)
size_t ZSTD_compressEnd(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
ZSTD_compressionParameters ZSTD_adjustCParams(ZSTD_compressionParameters cPar, unsigned long long srcSize, size_t dictSize)
ZSTD_CStream * ZSTD_createCStream_advanced(ZSTD_customMem customMem)
size_t ZSTD_initCStream_usingDict(ZSTD_CStream *zcs, const void *dict, size_t dictSize, int compressionLevel)
size_t ZSTD_compressBegin_advanced(ZSTD_CCtx *cctx, const void *dict, size_t dictSize, ZSTD_parameters params, unsigned long long pledgedSrcSize)
size_t ZSTD_CCtx_setParametersUsingCCtxParams(ZSTD_CCtx *cctx, const ZSTD_CCtx_params *params)
size_t ZSTD_compressContinue(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
size_t ZSTD_initCStream_srcSize(ZSTD_CStream *zcs, int compressionLevel, unsigned long long pss)
ZSTD_frameProgression ZSTD_getFrameProgression(const ZSTD_CCtx *cctx)
size_t ZSTD_generateSequences(ZSTD_CCtx *zc, ZSTD_Sequence *outSeqs, size_t outSeqsSize, const void *src, size_t srcSize)
size_t ZSTD_CCtx_setParams(ZSTD_CCtx *cctx, ZSTD_parameters params)
size_t ZSTD_estimateCStreamSize_usingCParams(ZSTD_compressionParameters cParams)
size_t ZSTD_compress_advanced(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const void *dict, size_t dictSize, ZSTD_parameters params)
size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params *CCtxParams, ZSTD_cParameter param, int value)
size_t ZSTD_CCtx_refThreadPool(ZSTD_CCtx *cctx, ZSTD_threadPool *pool)
size_t ZSTD_copyCCtx(ZSTD_CCtx *dstCCtx, const ZSTD_CCtx *srcCCtx, unsigned long long pledgedSrcSize)
size_t ZSTD_estimateCStreamSize(int compressionLevel)
size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params *params)
ZSTD_CDict * ZSTD_createCDict_advanced(const void *dictBuffer, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType, ZSTD_compressionParameters cParams, ZSTD_customMem customMem)
ZSTD_CDict * ZSTD_createCDict_advanced2(const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType, const ZSTD_CCtx_params *originalCctxParams, ZSTD_customMem customMem)
size_t ZSTD_CCtxParams_reset(ZSTD_CCtx_params *params)
size_t ZSTD_resetCStream(ZSTD_CStream *zcs, unsigned long long pss)
size_t ZSTD_CCtx_getParameter(ZSTD_CCtx const *cctx, ZSTD_cParameter param, int *value)
size_t ZSTD_CCtx_loadDictionary_advanced(ZSTD_CCtx *cctx, const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType)
size_t ZSTD_CCtx_refPrefix_advanced(ZSTD_CCtx *cctx, const void *prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType)
size_t ZSTD_CCtx_setCParams(ZSTD_CCtx *cctx, ZSTD_compressionParameters cparams)
size_t ZSTD_compressBegin_usingCDict_advanced(ZSTD_CCtx *const cctx, const ZSTD_CDict *const cdict, ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize)
const ZSTD_CDict * ZSTD_initStaticCDict(void *workspace, size_t workspaceSize, const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType, ZSTD_compressionParameters cParams)
size_t ZSTD_estimateCDictSize(size_t dictSize, int compressionLevel)
size_t ZSTD_compress_usingCDict_advanced(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const ZSTD_CDict *cdict, ZSTD_frameParameters fParams)
ZSTD_parameters ZSTD_getParams(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize)
size_t ZSTD_initCStream_advanced(ZSTD_CStream *zcs, const void *dict, size_t dictSize, ZSTD_parameters params, unsigned long long pss)
size_t ZSTD_CCtxParams_init_advanced(ZSTD_CCtx_params *cctxParams, ZSTD_parameters params)
ZSTD_DDict * ZSTD_createDDict_advanced(const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType, ZSTD_customMem customMem)
size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod)
const ZSTD_DDict * ZSTD_initStaticDDict(void *sBuffer, size_t sBufferSize, const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType)
ZSTD_DDict * ZSTD_createDDict_byReference(const void *dictBuffer, size_t dictSize)
size_t ZSTD_DCtx_loadDictionary_advanced(ZSTD_DCtx *dctx, const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType)
size_t ZSTD_nextSrcSizeToDecompress(ZSTD_DCtx *dctx)
size_t ZSTD_decodingBufferSize_min(unsigned long long windowSize, unsigned long long frameContentSize)
size_t ZSTD_DCtx_getParameter(ZSTD_DCtx *dctx, ZSTD_dParameter param, int *value)
size_t ZSTD_DCtx_loadDictionary_byReference(ZSTD_DCtx *dctx, const void *dict, size_t dictSize)
size_t ZSTD_decompressionMargin(void const *src, size_t srcSize)
size_t ZSTD_decompressBegin_usingDDict(ZSTD_DCtx *dctx, const ZSTD_DDict *ddict)
ZSTD_DCtx * ZSTD_initStaticDCtx(void *workspace, size_t workspaceSize)
size_t ZSTD_estimateDStreamSize_fromFrame(const void *src, size_t srcSize)
ZSTD_nextInputType_e ZSTD_nextInputType(ZSTD_DCtx *dctx)
size_t ZSTD_decompressBegin(ZSTD_DCtx *dctx)
size_t ZSTD_estimateDCtxSize(void)
ZSTD_DStream * ZSTD_createDStream_advanced(ZSTD_customMem customMem)
size_t ZSTD_getFrameHeader_advanced(ZSTD_frameHeader *zfhPtr, const void *src, size_t srcSize, ZSTD_format_e format)
ZSTD_DStream * ZSTD_initStaticDStream(void *workspace, size_t workspaceSize)
void ZSTD_copyDCtx(ZSTD_DCtx *dstDCtx, const ZSTD_DCtx *srcDCtx)
size_t ZSTD_DCtx_refPrefix_advanced(ZSTD_DCtx *dctx, const void *prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType)
size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx *dctx, const void *dict, size_t dictSize)
size_t ZSTD_resetDStream(ZSTD_DStream *dctx)
unsigned ZSTD_isSkippableFrame(const void *buffer, size_t size)
size_t ZSTD_DCtx_setFormat(ZSTD_DCtx *dctx, ZSTD_format_e format)
size_t ZSTD_frameHeaderSize(const void *src, size_t srcSize)
size_t ZSTD_estimateDStreamSize(size_t windowSize)
unsigned long long ZSTD_findDecompressedSize(const void *src, size_t srcSize)
size_t ZSTD_initDStream_usingDDict(ZSTD_DStream *dctx, const ZSTD_DDict *ddict)
size_t ZSTD_getFrameHeader(ZSTD_frameHeader *zfhPtr, const void *src, size_t srcSize)
size_t ZSTD_initDStream_usingDict(ZSTD_DStream *zds, const void *dict, size_t dictSize)
unsigned ZSTD_isFrame(const void *buffer, size_t size)
size_t ZSTD_decompressStream_simpleArgs(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, size_t *dstPos, const void *src, size_t srcSize, size_t *srcPos)
size_t ZSTD_insertBlock(ZSTD_DCtx *dctx, const void *blockStart, size_t blockSize)
unsigned long long ZSTD_decompressBound(const void *src, size_t srcSize)
ZSTD_DCtx * ZSTD_createDCtx_advanced(ZSTD_customMem customMem)
size_t ZSTD_DCtx_setMaxWindowSize(ZSTD_DCtx *dctx, size_t maxWindowSize)
size_t ZSTD_decompressContinue(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
size_t ZSTD_readSkippableFrame(void *dst, size_t dstCapacity, unsigned *magicVariant, const void *src, size_t srcSize)
size_t ZSTD_decompressBlock(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)