1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-29 11:21:22 +03:00

Addressing comments: -Created a list of extensions defined in fileio.h, -Updated test

This commit is contained in:
Shashank Tavildar
2019-10-28 14:54:54 -07:00
parent 48f856640e
commit 02433e0b15
5 changed files with 31 additions and 17 deletions

View File

@ -39,7 +39,7 @@ extern "C" {
#endif
#include <time.h> /* clock_t, clock, CLOCKS_PER_SEC, nanosleep */
#include "mem.h" /* U32, U64 */
#include "fileio.h"
/*-************************************************************
* Avoid fseek()'s 2GiB barrier with MSVC, macOS, *BSD, MinGW
@ -128,7 +128,18 @@ extern int g_utilDisplayLevel;
#endif
int g_excludeCompressedFiles;
static const char compressedFileExtensions[4][10] = {".zst",".gz",".xz",".lz4"};
static const char *g_compressedFileExtensions[] = {
ZSTD_EXTENSION,
TZSTD_EXTENSION,
GZ_EXTENSION,
TGZ_EXTENSION,
LZMA_EXTENSION,
XZ_EXTENSION,
TXZ_EXTENSION,
LZ4_EXTENSION,
TLZ4_EXTENSION,
NULL
};
int UTIL_fileExist(const char* filename);
int UTIL_isRegularFile(const char* infilename);
@ -137,8 +148,8 @@ U32 UTIL_isDirectory(const char* infilename);
int UTIL_getFileStat(const char* infilename, stat_t* statbuf);
int UTIL_isSameFile(const char* file1, const char* file2);
int UTIL_compareStr(const void *p1, const void *p2);
int UTIL_isPrecompressedFile(const char* infilename);
int compareExtensions(const char* infilename, const char extensionList[4][10]);
int UTIL_isCompressedFile(const char* infilename);
int compareExtensions(const char* infilename, const char *extensionList[]);
U32 UTIL_isFIFO(const char* infilename);
U32 UTIL_isLink(const char* infilename);