abstracted storeSeq() sumtype numeric representation from zstd_opt.c
This commit is contained in:
@@ -586,6 +586,7 @@ ZSTD_safecopyLiterals(BYTE* op, BYTE const* ip, BYTE const* const iend, BYTE con
|
||||
#define STORED_IS_REPCODE(o) ((o) < ZSTD_REP_NUM)
|
||||
#define STORED_OFFSET(o) (assert(STORED_IS_OFFSET(o)), (o)-ZSTD_REP_MOVE)
|
||||
#define STORED_REPCODE(o) (assert(STORED_IS_REPCODE(o)), (o)+1) /* returns ID 1,2,3 */
|
||||
#define STORED_TO_OFFBASE(o) ((o)+1)
|
||||
|
||||
/*! ZSTD_storeSeq() :
|
||||
* Store a sequence (litlen, litPtr, offCode and matchLength) into seqStore_t.
|
||||
@@ -639,7 +640,7 @@ ZSTD_storeSeq(seqStore_t* seqStorePtr,
|
||||
seqStorePtr->sequences[0].litLength = (U16)litLength;
|
||||
|
||||
/* match offset */
|
||||
seqStorePtr->sequences[0].offBase = offBase_minus1 + 1;
|
||||
seqStorePtr->sequences[0].offBase = STORED_TO_OFFBASE(offBase_minus1);
|
||||
|
||||
/* match Length */
|
||||
assert(matchLength >= MINMATCH);
|
||||
|
||||
Reference in New Issue
Block a user