/* *************************************
* Advanced functions
***************************************/
-#define ZSTD_MAX_CLEVEL 20
++#define ZSTD_MAX_CLEVEL 24
+ ZSTDLIB_API unsigned ZSTD_maxCLevel (void);
+
/*! ZSTD_getParams
* @return ZSTD_parameters structure for a selected compression level and srcSize.
* @srcSizeHint value is optional, select 0 if not known */
/* **************************************
* Block functions
****************************************/
- /*!Block functions produce and decode raw zstd blocks, without frame metadata.
- Frame headers won't be generated.
- User will have to save and regenerate fields required to regenerate data, such as block sizes.
-
- A few rules to respect :
- - Uncompressed block size must be <= 128 KB
- - Compressing or decompressing requires a context structure
- + Use ZSTD_createXCtx() to create them
- - It is necessary to init context before starting
- + compression : ZSTD_compressBegin()
- + decompression : ZSTD_decompressBegin()
- + variants _usingDict() are also allowed
- + copyXCtx() works too
- - When a block is considered not compressible enough, ZSTD_compressBlock() result will be zero.
- In which case, nothing is produced into `dst`.
- + User must test for such outcome and deal directly with uncompressed data
- + ZSTD_decompressBlock() doesn't accept uncompressed data as input !!
+ /*! Block functions produce and decode raw zstd blocks, without frame metadata.
+ User will have to save and regenerate necessary information to regenerate data, such as block sizes.
+
+ A few rules to respect :
+ - Uncompressed block size must be <= 128 KB
+ - Compressing or decompressing requires a context structure
+ + Use ZSTD_createCCtx() and ZSTD_createDCtx()
+ - It is necessary to init context before starting
+ + compression : ZSTD_compressBegin()
+ + decompression : ZSTD_decompressBegin()
+ + variants _usingDict() are also allowed
+ + copyCCtx() and copyDCtx() work too
+ - When a block is considered not compressible enough, ZSTD_compressBlock() result will be zero.
+ In which case, nothing is produced into @dst.
+ + User must test for such outcome and deal directly with uncompressed data
+ + ZSTD_decompressBlock() doesn't accept uncompressed data as input !!
*/
- size_t ZSTD_compressBlock (ZSTD_CCtx* cctx, void* dst, size_t maxDstSize, const void* src, size_t srcSize);
- size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* src, size_t srcSize);
-
+
- /* *************************************
- * Pre-defined compression levels
- ***************************************/
- #define ZSTD_MAX_CLEVEL 24
- ZSTDLIB_API unsigned ZSTD_maxCLevel (void);
+ size_t ZSTD_compressBlock (ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
+ size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
/* *************************************