MCPcopy Create free account
hub / github.com/F-Stack/f-stack / FIO_createPreferences

Function FIO_createPreferences

freebsd/contrib/zstd/programs/fileio.c:352–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350
351
352FIO_prefs_t* FIO_createPreferences(void)
353{
354 FIO_prefs_t* const ret = (FIO_prefs_t*)malloc(sizeof(FIO_prefs_t));
355 if (!ret) EXM_THROW(21, "Allocation error : not enough memory");
356
357 ret->compressionType = FIO_zstdCompression;
358 ret->overwrite = 0;
359 ret->sparseFileSupport = ZSTD_SPARSE_DEFAULT;
360 ret->dictIDFlag = 1;
361 ret->checksumFlag = 1;
362 ret->removeSrcFile = 0;
363 ret->memLimit = 0;
364 ret->nbWorkers = 1;
365 ret->blockSize = 0;
366 ret->overlapLog = FIO_OVERLAP_LOG_NOTSET;
367 ret->adaptiveMode = 0;
368 ret->rsyncable = 0;
369 ret->minAdaptLevel = -50; /* initializing this value requires a constant, so ZSTD_minCLevel() doesn't work */
370 ret->maxAdaptLevel = 22; /* initializing this value requires a constant, so ZSTD_maxCLevel() doesn't work */
371 ret->ldmFlag = 0;
372 ret->ldmHashLog = 0;
373 ret->ldmMinMatch = 0;
374 ret->ldmBucketSizeLog = FIO_LDM_PARAM_NOTSET;
375 ret->ldmHashRateLog = FIO_LDM_PARAM_NOTSET;
376 ret->streamSrcSize = 0;
377 ret->targetCBlockSize = 0;
378 ret->srcSizeHint = 0;
379 ret->testMode = 0;
380 ret->literalCompressionMode = ZSTD_lcm_auto;
381 ret->excludeCompressedFiles = 0;
382 return ret;
383}
384
385FIO_ctx_t* FIO_createContext(void)
386{

Callers 1

mainFunction · 0.85

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected