]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add ZSTD_compressionParameters to ZSTD_matchState_t
authorW. Felix Handte <w@felixhandte.com>
Thu, 23 Aug 2018 18:32:32 +0000 (11:32 -0700)
committerW. Felix Handte <w@felixhandte.com>
Sat, 29 Sep 2018 00:10:42 +0000 (17:10 -0700)
lib/compress/zstd_compress.c
lib/compress/zstd_compress_internal.h

index 3eb5ceb21f21b951948f3c11a43988aaa24fae59..5c508568f816311953f25af4115b5e79041173cd 100644 (file)
@@ -1102,6 +1102,8 @@ ZSTD_reset_matchState(ZSTD_matchState_t* ms,
     ms->hashTable3 = ms->chainTable + chainSize;
     ptr = ms->hashTable3 + h3Size;
 
+    ms->cParams = *cParams;
+
     assert(((size_t)ptr & 3) == 0);
     return ptr;
 }
@@ -1376,6 +1378,7 @@ static size_t ZSTD_resetCCtx_usingCDict(ZSTD_CCtx* cctx,
             dstMatchState->nextToUpdate = srcMatchState->nextToUpdate;
             dstMatchState->nextToUpdate3= srcMatchState->nextToUpdate3;
             dstMatchState->loadedDictEnd= srcMatchState->loadedDictEnd;
+            dstMatchState->cParams      = srcMatchState->cParams;
         }
     }
 
index 1c95b7de9e949b3596a50f1a73dabe670e4409c1..1c45d1b075dd52d7e28cde7356b23d35ab030492 100644 (file)
@@ -140,6 +140,7 @@ struct ZSTD_matchState_t {
     U32* chainTable;
     optState_t opt;         /* optimal parser state */
     const ZSTD_matchState_t *dictMatchState;
+    ZSTD_compressionParameters cParams;
 };
 
 typedef struct {