Split out zstd_fast dict match state function
This commit is contained in:
+168
-125
@@ -45,7 +45,119 @@ FORCE_INLINE_TEMPLATE
|
|||||||
size_t ZSTD_compressBlock_fast_generic(
|
size_t ZSTD_compressBlock_fast_generic(
|
||||||
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
||||||
void const* src, size_t srcSize,
|
void const* src, size_t srcSize,
|
||||||
U32 const mls, ZSTD_dictMode_e const dictMode)
|
U32 const mls)
|
||||||
|
{
|
||||||
|
const ZSTD_compressionParameters* const cParams = &ms->cParams;
|
||||||
|
U32* const hashTable = ms->hashTable;
|
||||||
|
U32 const hlog = cParams->hashLog;
|
||||||
|
/* support stepSize of 0 */
|
||||||
|
U32 const stepSize = cParams->targetLength + !(cParams->targetLength);
|
||||||
|
const BYTE* const base = ms->window.base;
|
||||||
|
const BYTE* const istart = (const BYTE*)src;
|
||||||
|
const BYTE* ip = istart;
|
||||||
|
const BYTE* anchor = istart;
|
||||||
|
const U32 prefixStartIndex = ms->window.dictLimit;
|
||||||
|
const BYTE* const prefixStart = base + prefixStartIndex;
|
||||||
|
const BYTE* const iend = istart + srcSize;
|
||||||
|
const BYTE* const ilimit = iend - HASH_READ_SIZE;
|
||||||
|
U32 offset_1=rep[0], offset_2=rep[1];
|
||||||
|
U32 offsetSaved = 0;
|
||||||
|
|
||||||
|
/* init */
|
||||||
|
ip += (ip == prefixStart);
|
||||||
|
{
|
||||||
|
U32 const maxRep = (U32)(ip - prefixStart);
|
||||||
|
if (offset_2 > maxRep) offsetSaved = offset_2, offset_2 = 0;
|
||||||
|
if (offset_1 > maxRep) offsetSaved = offset_1, offset_1 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Main Search Loop */
|
||||||
|
while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */
|
||||||
|
size_t mLength;
|
||||||
|
size_t const h = ZSTD_hashPtr(ip, hlog, mls);
|
||||||
|
U32 const current = (U32)(ip-base);
|
||||||
|
U32 const matchIndex = hashTable[h];
|
||||||
|
const BYTE* match = base + matchIndex;
|
||||||
|
hashTable[h] = current; /* update hash table */
|
||||||
|
|
||||||
|
if ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1))) {
|
||||||
|
mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4;
|
||||||
|
ip++;
|
||||||
|
ZSTD_storeSeq(seqStore, ip-anchor, anchor, 0, mLength-MINMATCH);
|
||||||
|
} else if ((matchIndex <= prefixStartIndex) || MEM_read32(match) != MEM_read32(ip)) {
|
||||||
|
assert(stepSize >= 1);
|
||||||
|
ip += ((ip-anchor) >> kSearchStrength) + stepSize;
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
/* found a regular match */
|
||||||
|
U32 const offset = (U32)(ip-match);
|
||||||
|
mLength = ZSTD_count(ip+4, match+4, iend) + 4;
|
||||||
|
while (((ip>anchor) & (match>prefixStart))
|
||||||
|
&& (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */
|
||||||
|
offset_2 = offset_1;
|
||||||
|
offset_1 = offset;
|
||||||
|
ZSTD_storeSeq(seqStore, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* match found */
|
||||||
|
ip += mLength;
|
||||||
|
anchor = ip;
|
||||||
|
|
||||||
|
if (ip <= ilimit) {
|
||||||
|
/* Fill Table */
|
||||||
|
assert(base+current+2 > istart); /* check base overflow */
|
||||||
|
hashTable[ZSTD_hashPtr(base+current+2, hlog, mls)] = current+2; /* here because current+2 could be > iend-8 */
|
||||||
|
hashTable[ZSTD_hashPtr(ip-2, hlog, mls)] = (U32)(ip-2-base);
|
||||||
|
|
||||||
|
while ( (ip <= ilimit)
|
||||||
|
&& ( (offset_2>0)
|
||||||
|
& (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) {
|
||||||
|
/* store sequence */
|
||||||
|
size_t const rLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4;
|
||||||
|
U32 const tmpOff = offset_2; offset_2 = offset_1; offset_1 = tmpOff; /* swap offset_2 <=> offset_1 */
|
||||||
|
hashTable[ZSTD_hashPtr(ip, hlog, mls)] = (U32)(ip-base);
|
||||||
|
ZSTD_storeSeq(seqStore, 0, anchor, 0, rLength-MINMATCH);
|
||||||
|
ip += rLength;
|
||||||
|
anchor = ip;
|
||||||
|
continue; /* faster when present ... (?) */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* save reps for next block */
|
||||||
|
rep[0] = offset_1 ? offset_1 : offsetSaved;
|
||||||
|
rep[1] = offset_2 ? offset_2 : offsetSaved;
|
||||||
|
|
||||||
|
/* Return the last literals size */
|
||||||
|
return iend - anchor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
size_t ZSTD_compressBlock_fast(
|
||||||
|
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
||||||
|
void const* src, size_t srcSize)
|
||||||
|
{
|
||||||
|
ZSTD_compressionParameters const* cParams = &ms->cParams;
|
||||||
|
U32 const mls = cParams->minMatch;
|
||||||
|
assert(ms->dictMatchState == NULL);
|
||||||
|
switch(mls)
|
||||||
|
{
|
||||||
|
default: /* includes case 3 */
|
||||||
|
case 4 :
|
||||||
|
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 4);
|
||||||
|
case 5 :
|
||||||
|
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 5);
|
||||||
|
case 6 :
|
||||||
|
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 6);
|
||||||
|
case 7 :
|
||||||
|
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCE_INLINE_TEMPLATE
|
||||||
|
size_t ZSTD_compressBlock_fast_dictMatchState_generic(
|
||||||
|
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
||||||
|
void const* src, size_t srcSize, U32 const mls)
|
||||||
{
|
{
|
||||||
const ZSTD_compressionParameters* const cParams = &ms->cParams;
|
const ZSTD_compressionParameters* const cParams = &ms->cParams;
|
||||||
U32* const hashTable = ms->hashTable;
|
U32* const hashTable = ms->hashTable;
|
||||||
@@ -64,46 +176,26 @@ size_t ZSTD_compressBlock_fast_generic(
|
|||||||
U32 offsetSaved = 0;
|
U32 offsetSaved = 0;
|
||||||
|
|
||||||
const ZSTD_matchState_t* const dms = ms->dictMatchState;
|
const ZSTD_matchState_t* const dms = ms->dictMatchState;
|
||||||
const ZSTD_compressionParameters* const dictCParams =
|
const ZSTD_compressionParameters* const dictCParams = &dms->cParams ;
|
||||||
dictMode == ZSTD_dictMatchState ?
|
const U32* const dictHashTable = dms->hashTable;
|
||||||
&dms->cParams : NULL;
|
const U32 dictStartIndex = dms->window.dictLimit;
|
||||||
const U32* const dictHashTable = dictMode == ZSTD_dictMatchState ?
|
const BYTE* const dictBase = dms->window.base;
|
||||||
dms->hashTable : NULL;
|
const BYTE* const dictStart = dictBase + dictStartIndex;
|
||||||
const U32 dictStartIndex = dictMode == ZSTD_dictMatchState ?
|
const BYTE* const dictEnd = dms->window.nextSrc;
|
||||||
dms->window.dictLimit : 0;
|
const U32 dictIndexDelta = prefixStartIndex - (U32)(dictEnd - dictBase);
|
||||||
const BYTE* const dictBase = dictMode == ZSTD_dictMatchState ?
|
|
||||||
dms->window.base : NULL;
|
|
||||||
const BYTE* const dictStart = dictMode == ZSTD_dictMatchState ?
|
|
||||||
dictBase + dictStartIndex : NULL;
|
|
||||||
const BYTE* const dictEnd = dictMode == ZSTD_dictMatchState ?
|
|
||||||
dms->window.nextSrc : NULL;
|
|
||||||
const U32 dictIndexDelta = dictMode == ZSTD_dictMatchState ?
|
|
||||||
prefixStartIndex - (U32)(dictEnd - dictBase) :
|
|
||||||
0;
|
|
||||||
const U32 dictAndPrefixLength = (U32)(ip - prefixStart + dictEnd - dictStart);
|
const U32 dictAndPrefixLength = (U32)(ip - prefixStart + dictEnd - dictStart);
|
||||||
const U32 dictHLog = dictMode == ZSTD_dictMatchState ?
|
const U32 dictHLog = dictCParams->hashLog;
|
||||||
dictCParams->hashLog : hlog;
|
|
||||||
|
|
||||||
assert(dictMode == ZSTD_noDict || dictMode == ZSTD_dictMatchState);
|
|
||||||
|
|
||||||
/* otherwise, we would get index underflow when translating a dict index
|
/* otherwise, we would get index underflow when translating a dict index
|
||||||
* into a local index */
|
* into a local index */
|
||||||
assert(dictMode != ZSTD_dictMatchState
|
assert(prefixStartIndex >= (U32)(dictEnd - dictBase));
|
||||||
|| prefixStartIndex >= (U32)(dictEnd - dictBase));
|
|
||||||
|
|
||||||
/* init */
|
/* init */
|
||||||
ip += (dictAndPrefixLength == 0);
|
ip += (dictAndPrefixLength == 0);
|
||||||
if (dictMode == ZSTD_noDict) {
|
/* dictMatchState repCode checks don't currently handle repCode == 0
|
||||||
U32 const maxRep = (U32)(ip - prefixStart);
|
* disabling. */
|
||||||
if (offset_2 > maxRep) offsetSaved = offset_2, offset_2 = 0;
|
assert(offset_1 <= dictAndPrefixLength);
|
||||||
if (offset_1 > maxRep) offsetSaved = offset_1, offset_1 = 0;
|
assert(offset_2 <= dictAndPrefixLength);
|
||||||
}
|
|
||||||
if (dictMode == ZSTD_dictMatchState) {
|
|
||||||
/* dictMatchState repCode checks don't currently handle repCode == 0
|
|
||||||
* disabling. */
|
|
||||||
assert(offset_1 <= dictAndPrefixLength);
|
|
||||||
assert(offset_2 <= dictAndPrefixLength);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Main Search Loop */
|
/* Main Search Loop */
|
||||||
while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */
|
while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */
|
||||||
@@ -113,50 +205,37 @@ size_t ZSTD_compressBlock_fast_generic(
|
|||||||
U32 const matchIndex = hashTable[h];
|
U32 const matchIndex = hashTable[h];
|
||||||
const BYTE* match = base + matchIndex;
|
const BYTE* match = base + matchIndex;
|
||||||
const U32 repIndex = current + 1 - offset_1;
|
const U32 repIndex = current + 1 - offset_1;
|
||||||
const BYTE* repMatch = (dictMode == ZSTD_dictMatchState
|
const BYTE* repMatch = (repIndex < prefixStartIndex) ?
|
||||||
&& repIndex < prefixStartIndex) ?
|
|
||||||
dictBase + (repIndex - dictIndexDelta) :
|
dictBase + (repIndex - dictIndexDelta) :
|
||||||
base + repIndex;
|
base + repIndex;
|
||||||
hashTable[h] = current; /* update hash table */
|
hashTable[h] = current; /* update hash table */
|
||||||
|
|
||||||
if ( (dictMode == ZSTD_dictMatchState)
|
if ( ((U32)((prefixStartIndex-1) - repIndex) >= 3) /* intentional underflow : ensure repIndex isn't overlapping dict + prefix */
|
||||||
&& ((U32)((prefixStartIndex-1) - repIndex) >= 3) /* intentional underflow : ensure repIndex isn't overlapping dict + prefix */
|
|
||||||
&& (MEM_read32(repMatch) == MEM_read32(ip+1)) ) {
|
&& (MEM_read32(repMatch) == MEM_read32(ip+1)) ) {
|
||||||
const BYTE* const repMatchEnd = repIndex < prefixStartIndex ? dictEnd : iend;
|
const BYTE* const repMatchEnd = repIndex < prefixStartIndex ? dictEnd : iend;
|
||||||
mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixStart) + 4;
|
mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixStart) + 4;
|
||||||
ip++;
|
ip++;
|
||||||
ZSTD_storeSeq(seqStore, ip-anchor, anchor, 0, mLength-MINMATCH);
|
ZSTD_storeSeq(seqStore, ip-anchor, anchor, 0, mLength-MINMATCH);
|
||||||
} else if ( dictMode == ZSTD_noDict
|
|
||||||
&& ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1)))) {
|
|
||||||
mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4;
|
|
||||||
ip++;
|
|
||||||
ZSTD_storeSeq(seqStore, ip-anchor, anchor, 0, mLength-MINMATCH);
|
|
||||||
} else if ( (matchIndex <= prefixStartIndex) ) {
|
} else if ( (matchIndex <= prefixStartIndex) ) {
|
||||||
if (dictMode == ZSTD_dictMatchState) {
|
size_t const dictHash = ZSTD_hashPtr(ip, dictHLog, mls);
|
||||||
size_t const dictHash = ZSTD_hashPtr(ip, dictHLog, mls);
|
U32 const dictMatchIndex = dictHashTable[dictHash];
|
||||||
U32 const dictMatchIndex = dictHashTable[dictHash];
|
const BYTE* dictMatch = dictBase + dictMatchIndex;
|
||||||
const BYTE* dictMatch = dictBase + dictMatchIndex;
|
if (dictMatchIndex <= dictStartIndex ||
|
||||||
if (dictMatchIndex <= dictStartIndex ||
|
MEM_read32(dictMatch) != MEM_read32(ip)) {
|
||||||
MEM_read32(dictMatch) != MEM_read32(ip)) {
|
|
||||||
assert(stepSize >= 1);
|
|
||||||
ip += ((ip-anchor) >> kSearchStrength) + stepSize;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
/* found a dict match */
|
|
||||||
U32 const offset = (U32)(current-dictMatchIndex-dictIndexDelta);
|
|
||||||
mLength = ZSTD_count_2segments(ip+4, dictMatch+4, iend, dictEnd, prefixStart) + 4;
|
|
||||||
while (((ip>anchor) & (dictMatch>dictStart))
|
|
||||||
&& (ip[-1] == dictMatch[-1])) {
|
|
||||||
ip--; dictMatch--; mLength++;
|
|
||||||
} /* catch up */
|
|
||||||
offset_2 = offset_1;
|
|
||||||
offset_1 = offset;
|
|
||||||
ZSTD_storeSeq(seqStore, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
assert(stepSize >= 1);
|
assert(stepSize >= 1);
|
||||||
ip += ((ip-anchor) >> kSearchStrength) + stepSize;
|
ip += ((ip-anchor) >> kSearchStrength) + stepSize;
|
||||||
continue;
|
continue;
|
||||||
|
} else {
|
||||||
|
/* found a dict match */
|
||||||
|
U32 const offset = (U32)(current-dictMatchIndex-dictIndexDelta);
|
||||||
|
mLength = ZSTD_count_2segments(ip+4, dictMatch+4, iend, dictEnd, prefixStart) + 4;
|
||||||
|
while (((ip>anchor) & (dictMatch>dictStart))
|
||||||
|
&& (ip[-1] == dictMatch[-1])) {
|
||||||
|
ip--; dictMatch--; mLength++;
|
||||||
|
} /* catch up */
|
||||||
|
offset_2 = offset_1;
|
||||||
|
offset_1 = offset;
|
||||||
|
ZSTD_storeSeq(seqStore, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
|
||||||
}
|
}
|
||||||
} else if (MEM_read32(match) != MEM_read32(ip)) {
|
} else if (MEM_read32(match) != MEM_read32(ip)) {
|
||||||
/* it's not a match, and we're not going to check the dictionary */
|
/* it's not a match, and we're not going to check the dictionary */
|
||||||
@@ -185,41 +264,27 @@ size_t ZSTD_compressBlock_fast_generic(
|
|||||||
hashTable[ZSTD_hashPtr(ip-2, hlog, mls)] = (U32)(ip-2-base);
|
hashTable[ZSTD_hashPtr(ip-2, hlog, mls)] = (U32)(ip-2-base);
|
||||||
|
|
||||||
/* check immediate repcode */
|
/* check immediate repcode */
|
||||||
if (dictMode == ZSTD_dictMatchState) {
|
while (ip <= ilimit) {
|
||||||
while (ip <= ilimit) {
|
U32 const current2 = (U32)(ip-base);
|
||||||
U32 const current2 = (U32)(ip-base);
|
U32 const repIndex2 = current2 - offset_2;
|
||||||
U32 const repIndex2 = current2 - offset_2;
|
const BYTE* repMatch2 = repIndex2 < prefixStartIndex ?
|
||||||
const BYTE* repMatch2 = repIndex2 < prefixStartIndex ?
|
dictBase - dictIndexDelta + repIndex2 :
|
||||||
dictBase - dictIndexDelta + repIndex2 :
|
base + repIndex2;
|
||||||
base + repIndex2;
|
if ( ((U32)((prefixStartIndex-1) - (U32)repIndex2) >= 3 /* intentional overflow */)
|
||||||
if ( ((U32)((prefixStartIndex-1) - (U32)repIndex2) >= 3 /* intentional overflow */)
|
&& (MEM_read32(repMatch2) == MEM_read32(ip)) ) {
|
||||||
&& (MEM_read32(repMatch2) == MEM_read32(ip)) ) {
|
const BYTE* const repEnd2 = repIndex2 < prefixStartIndex ? dictEnd : iend;
|
||||||
const BYTE* const repEnd2 = repIndex2 < prefixStartIndex ? dictEnd : iend;
|
size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, prefixStart) + 4;
|
||||||
size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, prefixStart) + 4;
|
U32 tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */
|
||||||
U32 tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */
|
ZSTD_storeSeq(seqStore, 0, anchor, 0, repLength2-MINMATCH);
|
||||||
ZSTD_storeSeq(seqStore, 0, anchor, 0, repLength2-MINMATCH);
|
hashTable[ZSTD_hashPtr(ip, hlog, mls)] = current2;
|
||||||
hashTable[ZSTD_hashPtr(ip, hlog, mls)] = current2;
|
ip += repLength2;
|
||||||
ip += repLength2;
|
|
||||||
anchor = ip;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dictMode == ZSTD_noDict) {
|
|
||||||
while ( (ip <= ilimit)
|
|
||||||
&& ( (offset_2>0)
|
|
||||||
& (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) {
|
|
||||||
/* store sequence */
|
|
||||||
size_t const rLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4;
|
|
||||||
U32 const tmpOff = offset_2; offset_2 = offset_1; offset_1 = tmpOff; /* swap offset_2 <=> offset_1 */
|
|
||||||
hashTable[ZSTD_hashPtr(ip, hlog, mls)] = (U32)(ip-base);
|
|
||||||
ZSTD_storeSeq(seqStore, 0, anchor, 0, rLength-MINMATCH);
|
|
||||||
ip += rLength;
|
|
||||||
anchor = ip;
|
anchor = ip;
|
||||||
continue; /* faster when present ... (?) */
|
continue;
|
||||||
} } } }
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* save reps for next block */
|
/* save reps for next block */
|
||||||
rep[0] = offset_1 ? offset_1 : offsetSaved;
|
rep[0] = offset_1 ? offset_1 : offsetSaved;
|
||||||
@@ -229,28 +294,6 @@ size_t ZSTD_compressBlock_fast_generic(
|
|||||||
return iend - anchor;
|
return iend - anchor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
size_t ZSTD_compressBlock_fast(
|
|
||||||
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
|
||||||
void const* src, size_t srcSize)
|
|
||||||
{
|
|
||||||
ZSTD_compressionParameters const* cParams = &ms->cParams;
|
|
||||||
U32 const mls = cParams->minMatch;
|
|
||||||
assert(ms->dictMatchState == NULL);
|
|
||||||
switch(mls)
|
|
||||||
{
|
|
||||||
default: /* includes case 3 */
|
|
||||||
case 4 :
|
|
||||||
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 4, ZSTD_noDict);
|
|
||||||
case 5 :
|
|
||||||
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 5, ZSTD_noDict);
|
|
||||||
case 6 :
|
|
||||||
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 6, ZSTD_noDict);
|
|
||||||
case 7 :
|
|
||||||
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 7, ZSTD_noDict);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t ZSTD_compressBlock_fast_dictMatchState(
|
size_t ZSTD_compressBlock_fast_dictMatchState(
|
||||||
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
||||||
void const* src, size_t srcSize)
|
void const* src, size_t srcSize)
|
||||||
@@ -262,13 +305,13 @@ size_t ZSTD_compressBlock_fast_dictMatchState(
|
|||||||
{
|
{
|
||||||
default: /* includes case 3 */
|
default: /* includes case 3 */
|
||||||
case 4 :
|
case 4 :
|
||||||
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 4, ZSTD_dictMatchState);
|
return ZSTD_compressBlock_fast_dictMatchState_generic(ms, seqStore, rep, src, srcSize, 4);
|
||||||
case 5 :
|
case 5 :
|
||||||
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 5, ZSTD_dictMatchState);
|
return ZSTD_compressBlock_fast_dictMatchState_generic(ms, seqStore, rep, src, srcSize, 5);
|
||||||
case 6 :
|
case 6 :
|
||||||
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 6, ZSTD_dictMatchState);
|
return ZSTD_compressBlock_fast_dictMatchState_generic(ms, seqStore, rep, src, srcSize, 6);
|
||||||
case 7 :
|
case 7 :
|
||||||
return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 7, ZSTD_dictMatchState);
|
return ZSTD_compressBlock_fast_dictMatchState_generic(ms, seqStore, rep, src, srcSize, 7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user