@@ -131,7 +131,7 @@ size_t ZSTD_compressBlock_doubleFast_noDict_generic(
131
131
if ((offset_1 > 0 ) & (MEM_read32 (ip + 1 - offset_1 ) == MEM_read32 (ip + 1 ))) {
132
132
mLength = ZSTD_count (ip + 1 + 4 , ip + 1 + 4 - offset_1 , iend ) + 4 ;
133
133
ip ++ ;
134
- ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , 0 , mLength );
134
+ ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , STORE_REPCODE_1 , mLength );
135
135
goto _match_stored ;
136
136
}
137
137
@@ -217,7 +217,7 @@ size_t ZSTD_compressBlock_doubleFast_noDict_generic(
217
217
hashLong [hl1 ] = (U32 )(ip1 - base );
218
218
}
219
219
220
- ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , offset + ZSTD_REP_MOVE , mLength );
220
+ ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , STORE_OFFSET ( offset ) , mLength );
221
221
222
222
_match_stored :
223
223
/* match found */
@@ -243,7 +243,7 @@ size_t ZSTD_compressBlock_doubleFast_noDict_generic(
243
243
U32 const tmpOff = offset_2 ; offset_2 = offset_1 ; offset_1 = tmpOff ; /* swap offset_2 <=> offset_1 */
244
244
hashSmall [ZSTD_hashPtr (ip , hBitsS , mls )] = (U32 )(ip - base );
245
245
hashLong [ZSTD_hashPtr (ip , hBitsL , 8 )] = (U32 )(ip - base );
246
- ZSTD_storeSeq (seqStore , 0 , anchor , iend , 0 , rLength );
246
+ ZSTD_storeSeq (seqStore , 0 , anchor , iend , STORE_REPCODE_1 , rLength );
247
247
ip += rLength ;
248
248
anchor = ip ;
249
249
continue ; /* faster when present ... (?) */
@@ -328,7 +328,7 @@ size_t ZSTD_compressBlock_doubleFast_dictMatchState_generic(
328
328
const BYTE * repMatchEnd = repIndex < prefixLowestIndex ? dictEnd : iend ;
329
329
mLength = ZSTD_count_2segments (ip + 1 + 4 , repMatch + 4 , iend , repMatchEnd , prefixLowest ) + 4 ;
330
330
ip ++ ;
331
- ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , 0 , mLength );
331
+ ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , STORE_REPCODE_1 , mLength );
332
332
goto _match_stored ;
333
333
}
334
334
@@ -419,7 +419,7 @@ size_t ZSTD_compressBlock_doubleFast_dictMatchState_generic(
419
419
offset_2 = offset_1 ;
420
420
offset_1 = offset ;
421
421
422
- ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , offset + ZSTD_REP_MOVE , mLength );
422
+ ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , STORE_OFFSET ( offset ) , mLength );
423
423
424
424
_match_stored :
425
425
/* match found */
@@ -448,7 +448,7 @@ size_t ZSTD_compressBlock_doubleFast_dictMatchState_generic(
448
448
const BYTE * const repEnd2 = repIndex2 < prefixLowestIndex ? dictEnd : iend ;
449
449
size_t const repLength2 = ZSTD_count_2segments (ip + 4 , repMatch2 + 4 , iend , repEnd2 , prefixLowest ) + 4 ;
450
450
U32 tmpOffset = offset_2 ; offset_2 = offset_1 ; offset_1 = tmpOffset ; /* swap offset_2 <=> offset_1 */
451
- ZSTD_storeSeq (seqStore , 0 , anchor , iend , 0 , repLength2 );
451
+ ZSTD_storeSeq (seqStore , 0 , anchor , iend , STORE_REPCODE_1 , repLength2 );
452
452
hashSmall [ZSTD_hashPtr (ip , hBitsS , mls )] = current2 ;
453
453
hashLong [ZSTD_hashPtr (ip , hBitsL , 8 )] = current2 ;
454
454
ip += repLength2 ;
@@ -585,7 +585,7 @@ static size_t ZSTD_compressBlock_doubleFast_extDict_generic(
585
585
const BYTE * repMatchEnd = repIndex < prefixStartIndex ? dictEnd : iend ;
586
586
mLength = ZSTD_count_2segments (ip + 1 + 4 , repMatch + 4 , iend , repMatchEnd , prefixStart ) + 4 ;
587
587
ip ++ ;
588
- ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , 0 , mLength );
588
+ ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , STORE_REPCODE_1 , mLength );
589
589
} else {
590
590
if ((matchLongIndex > dictStartIndex ) && (MEM_read64 (matchLong ) == MEM_read64 (ip ))) {
591
591
const BYTE * const matchEnd = matchLongIndex < prefixStartIndex ? dictEnd : iend ;
@@ -596,7 +596,7 @@ static size_t ZSTD_compressBlock_doubleFast_extDict_generic(
596
596
while (((ip > anchor ) & (matchLong > lowMatchPtr )) && (ip [-1 ] == matchLong [-1 ])) { ip -- ; matchLong -- ; mLength ++ ; } /* catch up */
597
597
offset_2 = offset_1 ;
598
598
offset_1 = offset ;
599
- ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , offset + ZSTD_REP_MOVE , mLength );
599
+ ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , STORE_OFFSET ( offset ) , mLength );
600
600
601
601
} else if ((matchIndex > dictStartIndex ) && (MEM_read32 (match ) == MEM_read32 (ip ))) {
602
602
size_t const h3 = ZSTD_hashPtr (ip + 1 , hBitsL , 8 );
@@ -621,7 +621,7 @@ static size_t ZSTD_compressBlock_doubleFast_extDict_generic(
621
621
}
622
622
offset_2 = offset_1 ;
623
623
offset_1 = offset ;
624
- ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , offset + ZSTD_REP_MOVE , mLength );
624
+ ZSTD_storeSeq (seqStore , (size_t )(ip - anchor ), anchor , iend , STORE_OFFSET ( offset ) , mLength );
625
625
626
626
} else {
627
627
ip += ((ip - anchor ) >> kSearchStrength ) + 1 ;
@@ -653,7 +653,7 @@ static size_t ZSTD_compressBlock_doubleFast_extDict_generic(
653
653
const BYTE * const repEnd2 = repIndex2 < prefixStartIndex ? dictEnd : iend ;
654
654
size_t const repLength2 = ZSTD_count_2segments (ip + 4 , repMatch2 + 4 , iend , repEnd2 , prefixStart ) + 4 ;
655
655
U32 const tmpOffset = offset_2 ; offset_2 = offset_1 ; offset_1 = tmpOffset ; /* swap offset_2 <=> offset_1 */
656
- ZSTD_storeSeq (seqStore , 0 , anchor , iend , 0 , repLength2 );
656
+ ZSTD_storeSeq (seqStore , 0 , anchor , iend , STORE_REPCODE_1 , repLength2 );
657
657
hashSmall [ZSTD_hashPtr (ip , hBitsS , mls )] = current2 ;
658
658
hashLong [ZSTD_hashPtr (ip , hBitsL , 8 )] = current2 ;
659
659
ip += repLength2 ;
0 commit comments