add "--format=gzip" option
parent
ca20edd960
commit
cfd4dc299a
|
@ -72,7 +72,7 @@ ifeq ($(HAVE_ZLIB), 1)
|
||||||
TEMP := $(shell rm have_zlib$(EXT))
|
TEMP := $(shell rm have_zlib$(EXT))
|
||||||
endif
|
endif
|
||||||
ifeq ($(HAVE_ZLIB), 1)
|
ifeq ($(HAVE_ZLIB), 1)
|
||||||
ZLIBCPP = -DZSTD_GZDECOMPRESS
|
ZLIBCPP = -DZSTD_GZCOMPRESS -DZSTD_GZDECOMPRESS
|
||||||
ZLIBLD = -lz
|
ZLIBLD = -lz
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,16 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*-*************************************
|
||||||
|
* Types
|
||||||
|
***************************************/
|
||||||
|
typedef enum { FIO_zstdCompression, FIO_gzipCompression } FIO_compresionType_t;
|
||||||
|
|
||||||
|
|
||||||
/*-*************************************
|
/*-*************************************
|
||||||
* Parameters
|
* Parameters
|
||||||
***************************************/
|
***************************************/
|
||||||
|
void FIO_setCompresionType(FIO_compresionType_t compresionType);
|
||||||
void FIO_overwriteMode(void);
|
void FIO_overwriteMode(void);
|
||||||
void FIO_setNotificationLevel(unsigned level);
|
void FIO_setNotificationLevel(unsigned level);
|
||||||
void FIO_setSparseWrite(unsigned sparse); /**< 0: no sparse; 1: disable on stdout; 2: always enabled */
|
void FIO_setSparseWrite(unsigned sparse); /**< 0: no sparse; 1: disable on stdout; 2: always enabled */
|
||||||
|
|
|
@ -123,6 +123,9 @@ static int usage_advanced(const char* programName)
|
||||||
DISPLAY( " -T# : use # threads for compression (default:1) \n");
|
DISPLAY( " -T# : use # threads for compression (default:1) \n");
|
||||||
DISPLAY( " -B# : select size of independent sections (default:0==automatic) \n");
|
DISPLAY( " -B# : select size of independent sections (default:0==automatic) \n");
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ZSTD_GZCOMPRESS
|
||||||
|
DISPLAY( "--format=gzip : output .gz files \n");
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef ZSTD_NODECOMPRESS
|
#ifndef ZSTD_NODECOMPRESS
|
||||||
DISPLAY( "--test : test compressed file integrity \n");
|
DISPLAY( "--test : test compressed file integrity \n");
|
||||||
|
@ -359,6 +362,7 @@ int main(int argCount, const char* argv[])
|
||||||
if (!strcmp(argument, "--keep")) { FIO_setRemoveSrcFile(0); continue; }
|
if (!strcmp(argument, "--keep")) { FIO_setRemoveSrcFile(0); continue; }
|
||||||
if (!strcmp(argument, "--rm")) { FIO_setRemoveSrcFile(1); continue; }
|
if (!strcmp(argument, "--rm")) { FIO_setRemoveSrcFile(1); continue; }
|
||||||
if (!strcmp(argument, "--priority=rt")) { setRealTimePrio = 1; continue; }
|
if (!strcmp(argument, "--priority=rt")) { setRealTimePrio = 1; continue; }
|
||||||
|
if (!strcmp(argument, "--format=gzip")) { FIO_setCompresionType(FIO_gzipCompression); continue; }
|
||||||
|
|
||||||
/* long commands with arguments */
|
/* long commands with arguments */
|
||||||
#ifndef ZSTD_NODICT
|
#ifndef ZSTD_NODICT
|
||||||
|
|
Loading…
Reference in New Issue