From c98f8e7b571bb2535d557be56c46f8346f2dca3e Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Mon, 20 Jun 2016 16:31:24 +0200 Subject: [PATCH] Modified : zstd CLI enables checksum by default --- NEWS | 3 +++ programs/fileio.c | 2 +- programs/zstdcli.c | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index dc2d66bc..9a58c321 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +v0.7.1 +modified : checksum enabled by default in command line + v0.7.0 New : Support for directory compression, using `-r`, thanks to Przemyslaw Skibinski New : Command `--rm`, to remove source file after successful de/compression diff --git a/programs/fileio.c b/programs/fileio.c index decc971c..90041250 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -137,7 +137,7 @@ static U32 g_sparseFileSupport = 1; /* 0 : no sparse allowed; 1: auto (file ye void FIO_setSparseWrite(unsigned sparse) { g_sparseFileSupport=sparse; } static U32 g_dictIDFlag = 1; void FIO_setDictIDFlag(unsigned dictIDFlag) { g_dictIDFlag = dictIDFlag; } -static U32 g_checksumFlag = 0; +static U32 g_checksumFlag = 1; void FIO_setChecksumFlag(unsigned checksumFlag) { g_checksumFlag = checksumFlag; } static U32 g_removeSrcFile = 0; void FIO_setRemoveSrcFile(unsigned flag) { g_removeSrcFile = (flag>0); } diff --git a/programs/zstdcli.c b/programs/zstdcli.c index b59c6ebd..bf40dadf 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -136,7 +136,7 @@ static int usage_advanced(const char* programName) #ifndef ZSTD_NOCOMPRESS DISPLAY( "--ultra : enable ultra modes (requires more memory to decompress)\n"); DISPLAY( "--no-dictID : don't write dictID into header (dictionary compression)\n"); - DISPLAY( "--check : enable integrity check\n"); + DISPLAY( "--[no-]check : integrity check (default:enabled)\n"); #endif #ifndef ZSTD_NODECOMPRESS DISPLAY( "--test : test compressed file integrity \n"); @@ -257,6 +257,7 @@ int main(int argCount, const char** argv) if (!strcmp(argument, "--stdout")) { forceStdout=1; outFileName=stdoutmark; displayLevel=1; continue; } if (!strcmp(argument, "--ultra")) { FIO_setMaxWLog(0); continue; } if (!strcmp(argument, "--check")) { FIO_setChecksumFlag(2); continue; } + if (!strcmp(argument, "--no-check")) { FIO_setChecksumFlag(0); continue; } if (!strcmp(argument, "--no-dictID")) { FIO_setDictIDFlag(0); continue; } if (!strcmp(argument, "--sparse")) { FIO_setSparseWrite(2); continue; } if (!strcmp(argument, "--no-sparse")) { FIO_setSparseWrite(0); continue; }