adding oversizeDuration to dctx and macros

This commit is contained in:
Bimba Shrestha
2020-04-03 13:08:29 -07:00
parent 7202184ee0
commit 05574ec141
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -111,6 +111,7 @@ static void ZSTD_initDCtx_internal(ZSTD_DCtx* dctx)
dctx->legacyContext = NULL;
dctx->previousLegacyVersion = 0;
dctx->noForwardProgress = 0;
dctx->oversizedDuration = 0;
dctx->bmi2 = ZSTD_cpuid_bmi2(ZSTD_cpuid());
}
@@ -95,6 +95,9 @@ typedef enum {
ZSTD_use_once = 1 /* Use the dictionary once and set to ZSTD_dont_use */
} ZSTD_dictUses_e;
#define ZSTD_OVERSIZED_MAXDURATION 128
#define ZSTD_OVERSIZED_FACTOR 3
struct ZSTD_DCtx_s
{
const ZSTD_seqSymbol* LLTptr;
@@ -151,6 +154,8 @@ struct ZSTD_DCtx_s
/* workspace */
BYTE litBuffer[ZSTD_BLOCKSIZE_MAX + WILDCOPY_OVERLENGTH];
BYTE headerBuffer[ZSTD_FRAMEHEADERSIZE_MAX];
size_t oversizedDuration;
}; /* typedef'd to ZSTD_DCtx within "zstd.h" */