summaryrefslogtreecommitdiffstats
path: root/programs
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2022-07-29 20:18:02 (GMT)
committerYann Collet <cyan@fb.com>2022-07-29 20:22:27 (GMT)
commit8f18b4b4e6de05b86036973e69aeaa1a31f7d271 (patch)
tree6e0d3fa0e0f150b0f1f2a7d05b544d6e72ff0b1f /programs
parentf01b7b5209c447acdee0db817f239e9925497329 (diff)
downloadlz4-8f18b4b4e6de05b86036973e69aeaa1a31f7d271.zip
lz4-8f18b4b4e6de05b86036973e69aeaa1a31f7d271.tar.gz
lz4-8f18b4b4e6de05b86036973e69aeaa1a31f7d271.tar.bz2
introduced new `--no-crc` command
which disables both frame and block checksums.
Diffstat (limited to 'programs')
-rw-r--r--programs/lz4.1.md3
-rw-r--r--programs/lz4cli.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/programs/lz4.1.md b/programs/lz4.1.md
index 56c0053..39dc925 100644
--- a/programs/lz4.1.md
+++ b/programs/lz4.1.md
@@ -188,6 +188,9 @@ only the latest one will be applied.
* `--[no-]frame-crc`:
Select frame checksum (default:enabled)
+* `--no-crc`:
+ Disable both frame and block checksums
+
* `--[no-]content-size`:
Header includes original size (default:not present)<br/>
Note : this option can only be activated when the original size can be
diff --git a/programs/lz4cli.c b/programs/lz4cli.c
index ca4951e..51969fd 100644
--- a/programs/lz4cli.c
+++ b/programs/lz4cli.c
@@ -391,6 +391,7 @@ int main(int argc, const char** argv)
|| (!strcmp(argument, "--to-stdout"))) { forceStdout=1; output_filename=stdoutmark; continue; }
if (!strcmp(argument, "--frame-crc")) { LZ4IO_setStreamChecksumMode(prefs, 1); BMK_skipChecksums(0); continue; }
if (!strcmp(argument, "--no-frame-crc")) { LZ4IO_setStreamChecksumMode(prefs, 0); BMK_skipChecksums(1); continue; }
+ if (!strcmp(argument, "--no-crc")) { LZ4IO_setStreamChecksumMode(prefs, 0); LZ4IO_setBlockChecksumMode(prefs, 0); BMK_skipChecksums(1); continue; }
if (!strcmp(argument, "--content-size")) { LZ4IO_setContentSize(prefs, 1); continue; }
if (!strcmp(argument, "--no-content-size")) { LZ4IO_setContentSize(prefs, 0); continue; }
if (!strcmp(argument, "--list")) { mode = om_list; continue; }