]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Modify SequenceRange to have posInSequence
authorsenhuang42 <senhuang96@fb.com>
Wed, 28 Oct 2020 15:07:36 +0000 (11:07 -0400)
committersenhuang42 <senhuang96@fb.com>
Mon, 16 Nov 2020 15:49:16 +0000 (10:49 -0500)
lib/compress/zstd_compress.c

index ce9ac1dd0756731776447c5bdd448649b6bfb9b6..4269d41ebd28b7590d6a2a4737fbe969df0b581d 100644 (file)
@@ -4489,15 +4489,17 @@ size_t ZSTD_compress2(ZSTD_CCtx* cctx,
 }
 
 typedef struct {
-    U32 startIdx;   /* Index in array of ZSTD_Sequence where range begins */
-    U32 startPos;   /* Absolute position within array of ZSTD_Sequence where range begins */
-    U32 endIdx;     /* Index in array of ZSTD_Sequence where range ends */
-    U32 endPos;     /* Absolute position within array of ZSTD_Sequence where range end */
+    U32 startIdx;             /* Index in array of ZSTD_Sequence where range begins */
+    U32 startPosInSequence;   /* Position within sequence at index 'startIdx' where range begins */
+    U32 endIdx;               /* Index in array of ZSTD_Sequence where range ends */
+    U32 endPosInSequence;     /* Position within sequence at index 'endIdx' where range ends */
 } ZSTD_sequenceRange;
 
 
 static void ZSTD_updateSequenceRange(ZSTD_sequenceRange* sequenceRange, size_t nbBytes,
                                      const ZSTD_Sequence* const inSeqs, size_t inSeqsSize) {
+    U32 newStartIdx = sequenceRange->endIdx;
+    U32 newStartPos = sequenceRange->endPos;
 }
 
 /* Returns 0 on success, otherwise ZSTD error code */