changed searchLength into minMatch
refactored all relevant API and calls for consistency.
This commit is contained in:
+19
-14
@@ -419,9 +419,11 @@ size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
|
||||
* More attempts result in better and slower compression.
|
||||
* This parameter is useless when using "fast" and "dFast" strategies.
|
||||
* Special: value 0 means "use default searchLog". */
|
||||
ZSTD_p_minMatch=105, </b>/* Minimum size of searched matches (note : repCode matches can be smaller).<b>
|
||||
* Larger values make faster compression and decompression, but decrease ratio.
|
||||
* Must be clamped between ZSTD_SEARCHLENGTH_MIN and ZSTD_SEARCHLENGTH_MAX.
|
||||
ZSTD_p_minMatch=105, </b>/* Minimum size of searched matches.<b>
|
||||
* Note that Zstandard can still find matches of smaller size,
|
||||
* it just tweaks its search algorithm to look for this size and larger.
|
||||
* Larger values increase compression and decompression speed, but decrease ratio.
|
||||
* Must be clamped between ZSTD_MINMATCH_MIN and ZSTD_MINMATCH_MAX.
|
||||
* Note that currently, for all strategies < btopt, effective minimum is 4.
|
||||
* , for all strategies > fast, effective maximum is 6.
|
||||
* Special: value 0 means "use default minMatchLength". */
|
||||
@@ -434,7 +436,6 @@ size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
|
||||
* Larger values make compression faster, and weaker.
|
||||
* Special: value 0 means "use default targetLength". */
|
||||
ZSTD_p_compressionStrategy=107, </b>/* See ZSTD_strategy enum definition.<b>
|
||||
* Cast selected strategy as unsigned for ZSTD_CCtx_setParameter() compatibility.
|
||||
* The higher the value of selected strategy, the more complex it is,
|
||||
* resulting in stronger and slower compression.
|
||||
* Special: value 0 means "use default strategy". */
|
||||
@@ -536,13 +537,18 @@ size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
|
||||
*/
|
||||
} ZSTD_cParameter;
|
||||
</b></pre><BR>
|
||||
<pre><b>int ZSTD_cParam_lowerBound(ZSTD_cParameter cParam);
|
||||
int ZSTD_cParam_upperBound(ZSTD_cParameter cParam);
|
||||
</b><p> All parameters must respect lower/upper bounds,
|
||||
otherwise they will either trigger an error
|
||||
or be automatically clamped.
|
||||
@return : requested bound (inclusive)
|
||||
note : if the request specifies a non-existing parameter, it will return 0.
|
||||
<pre><b>typedef struct {
|
||||
size_t error;
|
||||
int lowerBound;
|
||||
int upperBound;
|
||||
} ZSTD_bounds;
|
||||
</b></pre><BR>
|
||||
<pre><b>ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter cParam);
|
||||
</b><p> All parameters must belong to an interval with lower and upper bounds,
|
||||
otherwise they will either trigger an error or be automatically clamped.
|
||||
@return : a structure, ZSTD_bounds, which contains
|
||||
- an error status field, which must be tested using ZSTD_isError()
|
||||
- both lower and upper bounds, inclusive
|
||||
|
||||
</p></pre><BR>
|
||||
|
||||
@@ -555,8 +561,7 @@ int ZSTD_cParam_upperBound(ZSTD_cParameter cParam);
|
||||
the following parameters can be updated _during_ compression (within same frame):
|
||||
=> compressionLevel, hashLog, chainLog, searchLog, minMatch, targetLength and strategy.
|
||||
new parameters will be active for next job only (after a flush()).
|
||||
@result : informational value (typically, value being effectively set, after clamping),
|
||||
or an error code (which can be tested with ZSTD_isError()).
|
||||
@return : an error code (which can be tested using ZSTD_isError()).
|
||||
</p></pre><BR>
|
||||
|
||||
<pre><b>size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize);
|
||||
@@ -767,7 +772,7 @@ int ZSTD_cParam_upperBound(ZSTD_cParameter cParam);
|
||||
unsigned chainLog; </b>/**< fully searched segment : larger == more compression, slower, more memory (useless for fast) */<b>
|
||||
unsigned hashLog; </b>/**< dispatch table : larger == faster, more memory */<b>
|
||||
unsigned searchLog; </b>/**< nb of searches : larger == more compression, slower */<b>
|
||||
unsigned searchLength; </b>/**< match length searched : larger == faster decompression, sometimes less compression */<b>
|
||||
unsigned minMatch; </b>/**< match length searched : larger == faster decompression, sometimes less compression */<b>
|
||||
unsigned targetLength; </b>/**< acceptable match size for optimal parser (only) : larger == more compression, slower */<b>
|
||||
ZSTD_strategy strategy; </b>/**< see ZSTD_strategy definition above */<b>
|
||||
} ZSTD_compressionParameters;
|
||||
|
||||
Reference in New Issue
Block a user