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

Function main

freebsd/contrib/zstd/programs/zstdcli.c:695–1379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693#endif
694
695int main(int const argCount, const char* argv[])
696{
697 int argNb,
698 followLinks = 0,
699 forceStdout = 0,
700 hasStdout = 0,
701 ldmFlag = 0,
702 main_pause = 0,
703 nbWorkers = 0,
704 adapt = 0,
705 adaptMin = MINCLEVEL,
706 adaptMax = MAXCLEVEL,
707 rsyncable = 0,
708 nextArgumentsAreFiles = 0,
709 operationResult = 0,
710 separateFiles = 0,
711 setRealTimePrio = 0,
712 singleThread = 0,
713 showDefaultCParams = 0,
714 ultra=0,
715 contentSize=1;
716 double compressibility = 0.5;
717 unsigned bench_nbSeconds = 3; /* would be better if this value was synchronized from bench */
718 size_t blockSize = 0;
719
720 FIO_prefs_t* const prefs = FIO_createPreferences();
721 FIO_ctx_t* const fCtx = FIO_createContext();
722 zstd_operation_mode operation = zom_compress;
723 ZSTD_compressionParameters compressionParams;
724 int cLevel = init_cLevel();
725 int cLevelLast = MINCLEVEL - 1; /* lower than minimum */
726 unsigned recursive = 0;
727 unsigned memLimit = 0;
728 FileNamesTable* filenames = UTIL_allocateFileNamesTable((size_t)argCount); /* argCount >= 1 */
729 FileNamesTable* file_of_names = UTIL_allocateFileNamesTable((size_t)argCount); /* argCount >= 1 */
730 const char* programName = argv[0];
731 const char* outFileName = NULL;
732 const char* outDirName = NULL;
733 const char* outMirroredDirName = NULL;
734 const char* dictFileName = NULL;
735 const char* patchFromDictFileName = NULL;
736 const char* suffix = ZSTD_EXTENSION;
737 unsigned maxDictSize = g_defaultMaxDictSize;
738 unsigned dictID = 0;
739 size_t streamSrcSize = 0;
740 size_t targetCBlockSize = 0;
741 size_t srcSizeHint = 0;
742 int dictCLevel = g_defaultDictCLevel;
743 unsigned dictSelect = g_defaultSelectivityLevel;
744#ifndef ZSTD_NODICT
745 ZDICT_cover_params_t coverParams = defaultCoverParams();
746 ZDICT_fastCover_params_t fastCoverParams = defaultFastCoverParams();
747 dictType dict = fastCover;
748#endif
749#ifndef ZSTD_NOBENCH
750 BMK_advancedParams_t benchParams = BMK_initAdvancedParams();
751#endif
752 ZSTD_literalCompressionMode_e literalCompressionMode = ZSTD_lcm_auto;

Callers

nothing calls this directly

Calls 15

FIO_createPreferencesFunction · 0.85
FIO_createContextFunction · 0.85
init_cLevelFunction · 0.85
defaultCoverParamsFunction · 0.85
defaultFastCoverParamsFunction · 0.85
BMK_initAdvancedParamsFunction · 0.85
lastNameFromPathFunction · 0.85
init_nbThreadsFunction · 0.85
exeNameMatchFunction · 0.85
FIO_overwriteModeFunction · 0.85
FIO_setCompressionTypeFunction · 0.85

Tested by

no test coverage detected