]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add rawSeqStore to match state
authorsenhuang42 <senhuang96@fb.com>
Sat, 26 Sep 2020 15:07:52 +0000 (11:07 -0400)
committersenhuang42 <senhuang96@fb.com>
Wed, 7 Oct 2020 17:56:24 +0000 (13:56 -0400)
lib/compress/zstd_compress_internal.h

index 728afade7a5ef2e99309bf85f66f1c0f72201f7b..524cbb02566d016861c2f2b4115058e3681920cf 100644 (file)
@@ -86,6 +86,19 @@ typedef struct {
     U32 len;
 } ZSTD_match_t;
 
+typedef struct {
+    U32 offset;
+    U32 litLength;
+    U32 matchLength;
+} rawSeq;
+
+typedef struct {
+  rawSeq* seq;     /* The start of the sequences */
+  size_t pos;      /* The position where reading stopped. <= size. */
+  size_t size;     /* The number of sequences. <= capacity. */
+  size_t capacity; /* The capacity starting from `seq` pointer */
+} rawSeqStore_t;
+
 typedef struct {
     int price;
     U32 off;
@@ -152,6 +165,7 @@ struct ZSTD_matchState_t {
     optState_t opt;         /* optimal parser state */
     const ZSTD_matchState_t* dictMatchState;
     ZSTD_compressionParameters cParams;
+    rawSeqStore_t ldmSeqStore;
 };
 
 typedef struct {
@@ -183,19 +197,6 @@ typedef struct {
     U32 windowLog;          /* Window log for the LDM */
 } ldmParams_t;
 
-typedef struct {
-    U32 offset;
-    U32 litLength;
-    U32 matchLength;
-} rawSeq;
-
-typedef struct {
-  rawSeq* seq;     /* The start of the sequences */
-  size_t pos;      /* The position where reading stopped. <= size. */
-  size_t size;     /* The number of sequences. <= capacity. */
-  size_t capacity; /* The capacity starting from `seq` pointer */
-} rawSeqStore_t;
-
 typedef struct {
     int collectSequences;
     ZSTD_Sequence* seqStart;