]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add ZSTD_SequenceRange to count ranges in array of ZSTD_Sequence
authorsenhuang42 <senhuang96@fb.com>
Wed, 28 Oct 2020 15:04:18 +0000 (11:04 -0400)
committersenhuang42 <senhuang96@fb.com>
Mon, 16 Nov 2020 15:49:16 +0000 (10:49 -0500)
lib/compress/zstd_compress.c

index cb227bea56ebe037ad4d9cc2cd7cb2a78f2f1c6e..e81dedbf078eda5a81b637432faf99fb63fec8a9 100644 (file)
@@ -4488,6 +4488,13 @@ 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 */
+} ZSTD_sequenceRange;
+
 /* Returns 0 on success, otherwise ZSTD error code */
 static size_t ZSTD_copySequencesToSeqStore(ZSTD_CCtx* zc,
                                          const ZSTD_Sequence* inSeqs, size_t inSeqsSize,