cli: -M# is in bytes, not megabytes Without a suffix, -M200 sets a 200-byte limit and fails, as --memory=200 does. The help said megabytes since it was rewritten (678335c4f).
diff --git a/programs/README.md b/programs/README.md index 49a9db7..195cfd4 100644 --- a/programs/README.md +++ b/programs/README.md
@@ -238,7 +238,7 @@ Advanced decompression options: -l Print information about Zstandard-compressed files. --test Test compressed file integrity. - -M# Set the memory usage limit to # megabytes. + -M# Set the memory usage limit to # bytes (e.g. `-M256MB`). --[no-]sparse Enable sparse mode. [Default: Enabled for files, disabled for STDOUT.] --[no-]pass-through Pass through uncompressed files as-is. [Default: Disabled]
diff --git a/programs/zstdcli.c b/programs/zstdcli.c index 0d02201..92a4f54 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c
@@ -276,7 +276,7 @@ DISPLAYOUT("Advanced decompression options:\n"); DISPLAYOUT(" -l Print information about Zstandard-compressed files.\n"); DISPLAYOUT(" --test Test compressed file integrity.\n"); - DISPLAYOUT(" -M# Set the memory usage limit to # megabytes.\n"); + DISPLAYOUT(" -M# Set the memory usage limit to # bytes (e.g. `-M256MB`).\n"); # if ZSTD_SPARSE_DEFAULT DISPLAYOUT(" --[no-]sparse Enable sparse mode. [Default: Enabled for files, disabled for STDOUT.]\n"); # else