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

Function UTIL_isCompressedFile

freebsd/contrib/zstd/programs/util.c:650–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

648#endif /* #ifdef _WIN32 */
649
650int UTIL_isCompressedFile(const char *inputName, const char *extensionList[])
651{
652 const char* ext = UTIL_getFileExtension(inputName);
653 while(*extensionList!=NULL)
654 {
655 const int isCompressedExtension = strcmp(ext,*extensionList);
656 if(isCompressedExtension==0)
657 return 1;
658 ++extensionList;
659 }
660 return 0;
661}
662
663/*Utility function to get file extension from file */
664const char* UTIL_getFileExtension(const char* infilename)

Callers 1

Calls 2

UTIL_getFileExtensionFunction · 0.85
strcmpFunction · 0.85

Tested by

no test coverage detected