#define MB *(1<<20)
#define GB *(1U<<30)
+#define ADAPT_WINDOWLOG_DEFAULT 23 /* 8 MB */
#define DICTSIZE_MAX (32 MB) /* protection against large input (attack scenario) */
#define FNSPACE 30
if (dictFileName && (dictBuffer==NULL))
EXM_THROW(32, "allocation error : can't create dictBuffer");
+ if (g_adaptiveMode && !g_ldmFlag && !comprParams.windowLog)
+ comprParams.windowLog = ADAPT_WINDOWLOG_DEFAULT;
+
CHECK( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_p_contentSizeFlag, 1) ); /* always enable content size when available (note: supposed to be default) */
CHECK( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_p_dictIDFlag, g_dictIDFlag) );
CHECK( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_p_checksumFlag, g_checksumFlag) );
Final compressed result is slightly different from `-T1`.
* `--adapt` :
`zstd` will dynamically adapt compression level to perceived I/O conditions.
- The current compression level can be observed live by using command `-v`.
+ Compression level adaptation can be observed live by using command `-v`.
Works with multi-threading and `--long` mode.
- Does not work with `--single-thread`.
+ When not specified otherwise, uses a window size of 8 MB.
Due to the chaotic nature of dynamic adaptation, compressed result is not reproducible.
+ Adaptation does not work with `--single-thread`.
* `-D file`:
use `file` as Dictionary to compress or decompress FILE(s)
* `--no-dictID`: