Add ZSTD_defaultCLevel() function to public API

This commit is contained in:
Sen Huang
2021-03-25 08:04:00 -07:00
parent 413b3198b0
commit e398744a35
4 changed files with 16 additions and 0 deletions
+1
View File
@@ -5054,6 +5054,7 @@ size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output)
#define ZSTD_MAX_CLEVEL 22
int ZSTD_maxCLevel(void) { return ZSTD_MAX_CLEVEL; }
int ZSTD_minCLevel(void) { return (int)-ZSTD_TARGETLENGTH_MAX; }
int ZSTD_defaultCLevel(void) { return ZSTD_CLEVEL_DEFAULT; }
static const ZSTD_compressionParameters ZSTD_defaultCParameters[4][ZSTD_MAX_CLEVEL+1] = {
{ /* "default" - for any srcSize > 256 KB */
+4
View File
@@ -1918,6 +1918,10 @@ ZSTDLIB_API size_t ZSTD_compressStream2_simpleArgs (
const void* src, size_t srcSize, size_t* srcPos,
ZSTD_EndDirective endOp);
/*! ZSTD_defaultCLevel() :
* Returns the default compression level, specified by ZSTD_CLEVEL_DEFAULT
*/
ZSTDLIB_API int ZSTD_defaultCLevel(void);
/***************************************
* Advanced decompression functions