1
0
mirror of https://github.com/facebook/zstd.git synced 2025-08-01 09:47:01 +03:00

Changed command name to --check , -C, following xz convention

This commit is contained in:
Yann Collet
2016-06-02 17:05:50 +02:00
parent 87cfbe3e5f
commit 2c4acdabdc
2 changed files with 14 additions and 4 deletions

View File

@ -52,7 +52,7 @@ It also features a very fast decoder, with speed > 500 MB/s per core.
use `file` as Dictionary to compress or decompress FILE(s) use `file` as Dictionary to compress or decompress FILE(s)
.TP .TP
.B \-o file .B \-o file
save result into `file` (only possible with a single input FILE) save result into `file` (only possible with a single INPUT-FILE)
.TP .TP
.BR \-f ", " --force .BR \-f ", " --force
overwrite output without prompting overwrite output without prompting
@ -71,6 +71,13 @@ It also features a very fast decoder, with speed > 500 MB/s per core.
.TP .TP
.BR \-c ", " --stdout .BR \-c ", " --stdout
force write to standard output, even if it is the console force write to standard output, even if it is the console
.TP
.BR \-C ", " --check
add integrity check computed from uncompressed data
.TP
.BR \-t ", " --test
Test the integrity of compressed files. This option is equivalent to \fB--decompress --stdout > /dev/null\fR.
No files are created or removed.
.SH DICTIONARY .SH DICTIONARY
.PP .PP

View File

@ -134,10 +134,10 @@ static int usage_advanced(const char* programName)
#ifndef ZSTD_NOCOMPRESS #ifndef ZSTD_NOCOMPRESS
DISPLAY( "--ultra : enable ultra modes (requires more memory to decompress)\n"); DISPLAY( "--ultra : enable ultra modes (requires more memory to decompress)\n");
DISPLAY( "--no-dictID:don't write dictID into header (dictionary compression)\n"); DISPLAY( "--no-dictID:don't write dictID into header (dictionary compression)\n");
DISPLAY( "--checksum:compute checksum of content, for decompressor validation\n"); DISPLAY( "--check : enable integrity check\n");
#endif #endif
#ifndef ZSTD_NODECOMPRESS #ifndef ZSTD_NODECOMPRESS
DISPLAY( " -t : test compressed file integrity \n"); DISPLAY( "--test : test compressed file integrity \n");
DISPLAY( "--[no-]sparse : sparse mode (default:enabled on file, disabled on stdout)\n"); DISPLAY( "--[no-]sparse : sparse mode (default:enabled on file, disabled on stdout)\n");
#endif #endif
#ifndef ZSTD_NODICT #ifndef ZSTD_NODICT
@ -241,7 +241,7 @@ int main(int argCount, const char** argv)
if (!strcmp(argument, "--quiet")) { displayLevel--; continue; } if (!strcmp(argument, "--quiet")) { displayLevel--; continue; }
if (!strcmp(argument, "--stdout")) { forceStdout=1; outFileName=stdoutmark; displayLevel=1; continue; } if (!strcmp(argument, "--stdout")) { forceStdout=1; outFileName=stdoutmark; displayLevel=1; continue; }
if (!strcmp(argument, "--ultra")) { FIO_setMaxWLog(0); continue; } if (!strcmp(argument, "--ultra")) { FIO_setMaxWLog(0); continue; }
if (!strcmp(argument, "--checksum")) { FIO_setChecksumFlag(2); continue; } if (!strcmp(argument, "--check")) { FIO_setChecksumFlag(2); continue; }
if (!strcmp(argument, "--no-dictID")) { FIO_setDictIDFlag(0); continue; } if (!strcmp(argument, "--no-dictID")) { FIO_setDictIDFlag(0); continue; }
if (!strcmp(argument, "--sparse")) { FIO_setSparseWrite(2); continue; } if (!strcmp(argument, "--sparse")) { FIO_setSparseWrite(2); continue; }
if (!strcmp(argument, "--no-sparse")) { FIO_setSparseWrite(0); continue; } if (!strcmp(argument, "--no-sparse")) { FIO_setSparseWrite(0); continue; }
@ -305,6 +305,9 @@ int main(int argCount, const char** argv)
/* keep source file (default anyway, so useless; for gzip/xz compatibility) */ /* keep source file (default anyway, so useless; for gzip/xz compatibility) */
case 'k': argument++; break; case 'k': argument++; break;
/* Checksum */
case 'C': argument++; FIO_setChecksumFlag(2); break;
/* test compressed file */ /* test compressed file */
case 't': decode=1; outFileName=nulmark; argument++; break; case 't': decode=1; outFileName=nulmark; argument++; break;