Add CCtx Param Controlling Dict Attachment Behavior

This commit is contained in:
W. Felix Handte
2018-06-21 17:29:25 -04:00
parent e30f13bde0
commit 01bb1c1016
4 changed files with 47 additions and 1 deletions
+8
View File
@@ -48,6 +48,12 @@ extern "C" {
typedef enum { ZSTDcs_created=0, ZSTDcs_init, ZSTDcs_ongoing, ZSTDcs_ending } ZSTD_compressionStage_e;
typedef enum { zcss_init=0, zcss_load, zcss_flush } ZSTD_cStreamStage;
typedef enum {
ZSTD_dictDefaultAttach = 0,
ZSTD_dictForceAttach = 1,
ZSTD_dictForceCopy = -1,
} ZSTD_dictAttachPref_e;
typedef struct ZSTD_prefixDict_s {
const void* dict;
size_t dictSize;
@@ -186,6 +192,8 @@ struct ZSTD_CCtx_params_s {
int forceWindow; /* force back-references to respect limit of
* 1<<wLog, even for dictionary */
ZSTD_dictAttachPref_e attachDictPref;
/* Multithreading: used to pass parameters to mtctx */
unsigned nbWorkers;
unsigned jobSize;