@@ -366,7 +366,7 @@ MEM_STATIC U32 ZSTD_readMINMATCH(const void* memPtr, U32 length)
366
366
367
367
/* Update hashTable3 up to ip (excluded)
368
368
Assumption : always within prefix (i.e. not within extDict) */
369
- static U32 ZSTD_insertAndFindFirstIndexHash3 (ZSTD_matchState_t * ms ,
369
+ static U32 ZSTD_insertAndFindFirstIndexHash3 (const ZSTD_matchState_t * ms ,
370
370
U32 * nextToUpdate3 ,
371
371
const BYTE * const ip )
372
372
{
@@ -396,7 +396,7 @@ static U32 ZSTD_insertAndFindFirstIndexHash3 (ZSTD_matchState_t* ms,
396
396
* @param target The target of ZSTD_updateTree_internal() - we are filling to this position
397
397
* @return : nb of positions added */
398
398
static U32 ZSTD_insertBt1 (
399
- ZSTD_matchState_t * ms ,
399
+ const ZSTD_matchState_t * ms ,
400
400
const BYTE * const ip , const BYTE * const iend ,
401
401
U32 const target ,
402
402
U32 const mls , const int extDict )
@@ -421,8 +421,8 @@ static U32 ZSTD_insertBt1(
421
421
U32 * smallerPtr = bt + 2 * (curr & btMask );
422
422
U32 * largerPtr = smallerPtr + 1 ;
423
423
U32 dummy32 ; /* to be nullified at the end */
424
- /* windowLow is based on target because we're only need positions that will be
425
- * in the window at the end of the tree update.
424
+ /* windowLow is based on target because
425
+ * we only need positions that will be in the window at the end of the tree update.
426
426
*/
427
427
U32 const windowLow = ZSTD_getLowestMatchIndex (ms , target , cParams -> windowLog );
428
428
U32 matchEndIdx = curr + 8 + 1 ;
@@ -669,7 +669,7 @@ U32 ZSTD_insertBtAndGetAllMatches (
669
669
return 1 ;
670
670
} } }
671
671
/* no dictMatchState lookup: dicts don't have a populated HC3 table */
672
- }
672
+ } /* if (mls == 3) */
673
673
674
674
hashTable [h ] = curr ; /* Update Hash Table */
675
675
@@ -706,8 +706,7 @@ U32 ZSTD_insertBtAndGetAllMatches (
706
706
| (ip + matchLength == iLimit ) /* equal : no way to know if inf or sup */ ) {
707
707
if (dictMode == ZSTD_dictMatchState ) nbCompares = 0 ; /* break should also skip searching dms */
708
708
break ; /* drop, to preserve bt consistency (miss a little bit of compression) */
709
- }
710
- }
709
+ } }
711
710
712
711
if (match [matchLength ] < ip [matchLength ]) {
713
712
/* match smaller than current */
@@ -752,8 +751,7 @@ U32 ZSTD_insertBtAndGetAllMatches (
752
751
if ( (matchLength > ZSTD_OPT_NUM )
753
752
| (ip + matchLength == iLimit ) /* equal : no way to know if inf or sup */ ) {
754
753
break ; /* drop, to guarantee consistency (miss a little bit of compression) */
755
- }
756
- }
754
+ } }
757
755
758
756
if (dictMatchIndex <= dmsBtLow ) { break ; } /* beyond tree size, stop the search */
759
757
if (match [matchLength ] < ip [matchLength ]) {
@@ -763,9 +761,7 @@ U32 ZSTD_insertBtAndGetAllMatches (
763
761
/* match is larger than current */
764
762
commonLengthLarger = matchLength ;
765
763
dictMatchIndex = nextPtr [0 ];
766
- }
767
- }
768
- }
764
+ } } } /* if (dictMode == ZSTD_dictMatchState) */
769
765
770
766
assert (matchEndIdx > curr + 8 );
771
767
ms -> nextToUpdate = matchEndIdx - 8 ; /* skip repetitive patterns */
0 commit comments