scope: ZSTD_copySequencesToSeqStore*() are private to ZSTD_compress.c
no need to publish them outside of this unit.
This commit is contained in:
@@ -1203,13 +1203,13 @@ size_t ZSTD_CCtx_setCParams(ZSTD_CCtx* cctx, ZSTD_compressionParameters cparams)
|
|||||||
DEBUGLOG(4, "ZSTD_CCtx_setCParams");
|
DEBUGLOG(4, "ZSTD_CCtx_setCParams");
|
||||||
/* only update if all parameters are valid */
|
/* only update if all parameters are valid */
|
||||||
FORWARD_IF_ERROR(ZSTD_checkCParams(cparams), "");
|
FORWARD_IF_ERROR(ZSTD_checkCParams(cparams), "");
|
||||||
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_windowLog, cparams.windowLog), "");
|
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_windowLog, (int)cparams.windowLog), "");
|
||||||
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_chainLog, cparams.chainLog), "");
|
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_chainLog, (int)cparams.chainLog), "");
|
||||||
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_hashLog, cparams.hashLog), "");
|
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_hashLog, (int)cparams.hashLog), "");
|
||||||
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_searchLog, cparams.searchLog), "");
|
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_searchLog, (int)cparams.searchLog), "");
|
||||||
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_minMatch, cparams.minMatch), "");
|
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_minMatch, (int)cparams.minMatch), "");
|
||||||
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_targetLength, cparams.targetLength), "");
|
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_targetLength, (int)cparams.targetLength), "");
|
||||||
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_strategy, cparams.strategy), "");
|
FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_strategy, (int)cparams.strategy), "");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3239,6 +3239,13 @@ static size_t ZSTD_fastSequenceLengthSum(ZSTD_Sequence const* seqBuf, size_t seq
|
|||||||
return litLenSum + matchLenSum;
|
return litLenSum + matchLenSum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static size_t
|
||||||
|
ZSTD_copySequencesToSeqStoreExplicitBlockDelim(ZSTD_CCtx* cctx,
|
||||||
|
ZSTD_sequencePosition* seqPos,
|
||||||
|
const ZSTD_Sequence* const inSeqs, size_t inSeqsSize,
|
||||||
|
const void* src, size_t blockSize,
|
||||||
|
ZSTD_paramSwitch_e externalRepSearch);
|
||||||
|
|
||||||
typedef enum { ZSTDbss_compress, ZSTDbss_noCompress } ZSTD_buildSeqStore_e;
|
typedef enum { ZSTDbss_compress, ZSTDbss_noCompress } ZSTD_buildSeqStore_e;
|
||||||
|
|
||||||
static size_t ZSTD_buildSeqStore(ZSTD_CCtx* zc, const void* src, size_t srcSize)
|
static size_t ZSTD_buildSeqStore(ZSTD_CCtx* zc, const void* src, size_t srcSize)
|
||||||
@@ -6601,7 +6608,11 @@ static U32 ZSTD_finalizeOffBase(U32 rawOffset, const U32 rep[ZSTD_REP_NUM], U32
|
|||||||
return offBase;
|
return offBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
/* Returns 0 on success, and a ZSTD_error otherwise. This function scans through an array of
|
||||||
|
* ZSTD_Sequence, storing the sequences it finds, until it reaches a block delimiter.
|
||||||
|
* Note that the block delimiter must include the last literals of the block.
|
||||||
|
*/
|
||||||
|
static size_t
|
||||||
ZSTD_copySequencesToSeqStoreExplicitBlockDelim(ZSTD_CCtx* cctx,
|
ZSTD_copySequencesToSeqStoreExplicitBlockDelim(ZSTD_CCtx* cctx,
|
||||||
ZSTD_sequencePosition* seqPos,
|
ZSTD_sequencePosition* seqPos,
|
||||||
const ZSTD_Sequence* const inSeqs, size_t inSeqsSize,
|
const ZSTD_Sequence* const inSeqs, size_t inSeqsSize,
|
||||||
@@ -6687,7 +6698,19 @@ ZSTD_copySequencesToSeqStoreExplicitBlockDelim(ZSTD_CCtx* cctx,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
/* Returns the number of bytes to move the current read position back by.
|
||||||
|
* Only non-zero if we ended up splitting a sequence.
|
||||||
|
* Otherwise, it may return a ZSTD error if something went wrong.
|
||||||
|
*
|
||||||
|
* This function will attempt to scan through blockSize bytes
|
||||||
|
* represented by the sequences in @inSeqs,
|
||||||
|
* storing any (partial) sequences.
|
||||||
|
*
|
||||||
|
* Occasionally, we may want to change the actual number of bytes we consumed from inSeqs to
|
||||||
|
* avoid splitting a match, or to avoid splitting a match such that it would produce a match
|
||||||
|
* smaller than MINMATCH. In this case, we return the number of bytes that we didn't read from this block.
|
||||||
|
*/
|
||||||
|
static size_t
|
||||||
ZSTD_copySequencesToSeqStoreNoBlockDelim(ZSTD_CCtx* cctx,
|
ZSTD_copySequencesToSeqStoreNoBlockDelim(ZSTD_CCtx* cctx,
|
||||||
ZSTD_sequencePosition* seqPos,
|
ZSTD_sequencePosition* seqPos,
|
||||||
const ZSTD_Sequence* const inSeqs, size_t inSeqsSize,
|
const ZSTD_Sequence* const inSeqs, size_t inSeqsSize,
|
||||||
|
|||||||
@@ -1613,33 +1613,6 @@ U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat);
|
|||||||
*/
|
*/
|
||||||
void ZSTD_CCtx_trace(ZSTD_CCtx* cctx, size_t extraCSize);
|
void ZSTD_CCtx_trace(ZSTD_CCtx* cctx, size_t extraCSize);
|
||||||
|
|
||||||
/* Returns 0 on success, and a ZSTD_error otherwise. This function scans through an array of
|
|
||||||
* ZSTD_Sequence, storing the sequences it finds, until it reaches a block delimiter.
|
|
||||||
* Note that the block delimiter must include the last literals of the block.
|
|
||||||
*/
|
|
||||||
size_t
|
|
||||||
ZSTD_copySequencesToSeqStoreExplicitBlockDelim(ZSTD_CCtx* cctx,
|
|
||||||
ZSTD_sequencePosition* seqPos,
|
|
||||||
const ZSTD_Sequence* const inSeqs, size_t inSeqsSize,
|
|
||||||
const void* src, size_t blockSize, ZSTD_paramSwitch_e externalRepSearch);
|
|
||||||
|
|
||||||
/* Returns the number of bytes to move the current read position back by.
|
|
||||||
* Only non-zero if we ended up splitting a sequence.
|
|
||||||
* Otherwise, it may return a ZSTD error if something went wrong.
|
|
||||||
*
|
|
||||||
* This function will attempt to scan through blockSize bytes
|
|
||||||
* represented by the sequences in @inSeqs,
|
|
||||||
* storing any (partial) sequences.
|
|
||||||
*
|
|
||||||
* Occasionally, we may want to change the actual number of bytes we consumed from inSeqs to
|
|
||||||
* avoid splitting a match, or to avoid splitting a match such that it would produce a match
|
|
||||||
* smaller than MINMATCH. In this case, we return the number of bytes that we didn't read from this block.
|
|
||||||
*/
|
|
||||||
size_t
|
|
||||||
ZSTD_copySequencesToSeqStoreNoBlockDelim(ZSTD_CCtx* cctx, ZSTD_sequencePosition* seqPos,
|
|
||||||
const ZSTD_Sequence* const inSeqs, size_t inSeqsSize,
|
|
||||||
const void* src, size_t blockSize, ZSTD_paramSwitch_e externalRepSearch);
|
|
||||||
|
|
||||||
/* Returns 1 if an external sequence producer is registered, otherwise returns 0. */
|
/* Returns 1 if an external sequence producer is registered, otherwise returns 0. */
|
||||||
MEM_STATIC int ZSTD_hasExtSeqProd(const ZSTD_CCtx_params* params) {
|
MEM_STATIC int ZSTD_hasExtSeqProd(const ZSTD_CCtx_params* params) {
|
||||||
return params->extSeqProdFunc != NULL;
|
return params->extSeqProdFunc != NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user