Remove CParams Arg from ZSTD_ldm_blockCompress
This commit is contained in:
@@ -2394,7 +2394,6 @@ static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc,
|
|||||||
ZSTD_ldm_blockCompress(&zc->externSeqStore,
|
ZSTD_ldm_blockCompress(&zc->externSeqStore,
|
||||||
ms, &zc->seqStore,
|
ms, &zc->seqStore,
|
||||||
zc->blockState.nextCBlock->rep,
|
zc->blockState.nextCBlock->rep,
|
||||||
&zc->appliedParams.cParams,
|
|
||||||
src, srcSize);
|
src, srcSize);
|
||||||
assert(zc->externSeqStore.pos <= zc->externSeqStore.size);
|
assert(zc->externSeqStore.pos <= zc->externSeqStore.size);
|
||||||
} else if (zc->appliedParams.ldmParams.enableLdm) {
|
} else if (zc->appliedParams.ldmParams.enableLdm) {
|
||||||
@@ -2411,7 +2410,6 @@ static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc,
|
|||||||
ZSTD_ldm_blockCompress(&ldmSeqStore,
|
ZSTD_ldm_blockCompress(&ldmSeqStore,
|
||||||
ms, &zc->seqStore,
|
ms, &zc->seqStore,
|
||||||
zc->blockState.nextCBlock->rep,
|
zc->blockState.nextCBlock->rep,
|
||||||
&zc->appliedParams.cParams,
|
|
||||||
src, srcSize);
|
src, srcSize);
|
||||||
assert(ldmSeqStore.pos == ldmSeqStore.size);
|
assert(ldmSeqStore.pos == ldmSeqStore.size);
|
||||||
} else { /* not long range mode */
|
} else { /* not long range mode */
|
||||||
|
|||||||
@@ -590,8 +590,9 @@ static rawSeq maybeSplitSequence(rawSeqStore_t* rawSeqStore,
|
|||||||
|
|
||||||
size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore,
|
size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore,
|
||||||
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
||||||
ZSTD_compressionParameters const* cParams, void const* src, size_t srcSize)
|
void const* src, size_t srcSize)
|
||||||
{
|
{
|
||||||
|
const ZSTD_compressionParameters* const cParams = &ms->cParams;
|
||||||
unsigned const minMatch = cParams->searchLength;
|
unsigned const minMatch = cParams->searchLength;
|
||||||
ZSTD_blockCompressor const blockCompressor =
|
ZSTD_blockCompressor const blockCompressor =
|
||||||
ZSTD_selectBlockCompressor(cParams->strategy, ZSTD_matchState_dictMode(ms));
|
ZSTD_selectBlockCompressor(cParams->strategy, ZSTD_matchState_dictMode(ms));
|
||||||
@@ -624,8 +625,7 @@ size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore,
|
|||||||
DEBUGLOG(5, "calling block compressor on segment of size %u", sequence.litLength);
|
DEBUGLOG(5, "calling block compressor on segment of size %u", sequence.litLength);
|
||||||
{
|
{
|
||||||
size_t const newLitLength =
|
size_t const newLitLength =
|
||||||
blockCompressor(ms, seqStore, rep, ip,
|
blockCompressor(ms, seqStore, rep, ip, sequence.litLength);
|
||||||
sequence.litLength);
|
|
||||||
ip += sequence.litLength;
|
ip += sequence.litLength;
|
||||||
/* Update the repcodes */
|
/* Update the repcodes */
|
||||||
for (i = ZSTD_REP_NUM - 1; i > 0; i--)
|
for (i = ZSTD_REP_NUM - 1; i > 0; i--)
|
||||||
@@ -642,6 +642,5 @@ size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore,
|
|||||||
ZSTD_ldm_limitTableUpdate(ms, ip);
|
ZSTD_ldm_limitTableUpdate(ms, ip);
|
||||||
ZSTD_ldm_fillFastTables(ms, ip);
|
ZSTD_ldm_fillFastTables(ms, ip);
|
||||||
/* Compress the last literals */
|
/* Compress the last literals */
|
||||||
return blockCompressor(ms, seqStore, rep,
|
return blockCompressor(ms, seqStore, rep, ip, iend - ip);
|
||||||
ip, iend - ip);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ size_t ZSTD_ldm_generateSequences(
|
|||||||
*/
|
*/
|
||||||
size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore,
|
size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore,
|
||||||
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
||||||
ZSTD_compressionParameters const* cParams,
|
|
||||||
void const* src, size_t srcSize);
|
void const* src, size_t srcSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user