From 5935c990a0653abd71727d2cb5ebc5775a792864 Mon Sep 17 00:00:00 2001 From: Sean Purcell Date: Mon, 17 Apr 2017 16:05:20 -0700 Subject: [PATCH 1/3] Add zstdmt and -T0 to man page --- programs/zstd.1 | 7 +++++-- programs/zstd.1.md | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/programs/zstd.1 b/programs/zstd.1 index c6b2c2742..b8389042e 100644 --- a/programs/zstd.1 +++ b/programs/zstd.1 @@ -2,12 +2,15 @@ .TH "ZSTD" "1" "April 2017" "zstd 1.1.5" "User Commands" . .SH "NAME" -\fBzstd\fR \- zstd, unzstd, zstdcat \- Compress or decompress \.zst files +\fBzstd\fR \- zstd, zstdmt, unzstd, zstdcat \- Compress or decompress \.zst files . .SH "SYNOPSIS" \fBzstd\fR [\fIOPTIONS\fR] [\-|] [\-o ] . .P +\fBzstdmt\fR is equivalent to \fBzstd \-T0\fR +. +.P \fBunzstd\fR is equivalent to \fBzstd \-d\fR . .P @@ -98,7 +101,7 @@ unlocks high compression levels 20+ (maximum 22), using a lot more memory\. Note . .TP \fB\-T#\fR -Compress using # threads (default: 1)\. This modifier is only available if \fBzstd\fR was compiled with multithreading support\. +Compress using # threads (default: 1)\. If \fB#\fR is 0, attempt to detect the number of physical CPU cores and compress with that many threads\. This modifier is only available if \fBzstd\fR was compiled with multithreading support\. . .TP \fB\-D file\fR diff --git a/programs/zstd.1.md b/programs/zstd.1.md index 07c36f683..9044eb34e 100644 --- a/programs/zstd.1.md +++ b/programs/zstd.1.md @@ -1,11 +1,13 @@ -zstd(1) -- zstd, unzstd, zstdcat - Compress or decompress .zst files -==================================================================== +zstd(1) -- zstd, zstdmt, unzstd, zstdcat - Compress or decompress .zst files +============================================================================ SYNOPSIS -------- `zstd` [*OPTIONS*] [-|<INPUT-FILE>] [-o <OUTPUT-FILE>] +`zstdmt` is equivalent to `zstd -T0` + `unzstd` is equivalent to `zstd -d` `zstdcat` is equivalent to `zstd -dcf` @@ -101,6 +103,8 @@ the last one takes effect. Note that decompression will also require more memory when using these levels. * `-T#`: Compress using # threads (default: 1). + If `#` is 0, attempt to detect the number of physical CPU cores and compress with + that many threads. This modifier is only available if `zstd` was compiled with multithreading support. * `-D file`: use `file` as Dictionary to compress or decompress FILE(s) From e6c504dbe604ffab1e6f9b68a62face1c4c23758 Mon Sep 17 00:00:00 2001 From: Sean Purcell Date: Mon, 17 Apr 2017 17:11:33 -0700 Subject: [PATCH 2/3] Update -T0 comment in man page --- programs/zstd.1 | 2 +- programs/zstd.1.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/zstd.1 b/programs/zstd.1 index b8389042e..b84ab3324 100644 --- a/programs/zstd.1 +++ b/programs/zstd.1 @@ -101,7 +101,7 @@ unlocks high compression levels 20+ (maximum 22), using a lot more memory\. Note . .TP \fB\-T#\fR -Compress using # threads (default: 1)\. If \fB#\fR is 0, attempt to detect the number of physical CPU cores and compress with that many threads\. This modifier is only available if \fBzstd\fR was compiled with multithreading support\. +Compress using # threads (default: 1)\. If \fB#\fR is 0, attempt to detect the number of physical CPU cores and compress with that many threads\. This modified does nothing if \fBzstd\fR was compiled without multithread support\. . .TP \fB\-D file\fR diff --git a/programs/zstd.1.md b/programs/zstd.1.md index 9044eb34e..4b918d8fd 100644 --- a/programs/zstd.1.md +++ b/programs/zstd.1.md @@ -105,7 +105,7 @@ the last one takes effect. Compress using # threads (default: 1). If `#` is 0, attempt to detect the number of physical CPU cores and compress with that many threads. - This modifier is only available if `zstd` was compiled with multithreading support. + This modified does nothing if `zstd` was compiled without multithread support. * `-D file`: use `file` as Dictionary to compress or decompress FILE(s) * `--nodictID`: From c8b2df7d6220f62f4f930e62dc361098b5a002c7 Mon Sep 17 00:00:00 2001 From: Sean Purcell Date: Mon, 17 Apr 2017 17:13:44 -0700 Subject: [PATCH 3/3] Compile CLI using files instead of objs This avoids conflicts between how the library was configured and how the CLI was configured. --- programs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/Makefile b/programs/Makefile index aca442644..f3140a19c 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -136,7 +136,7 @@ zstd-nogz : LZMA_MSG := $(NO_LZMA_MSG) xzstd : CPPFLAGS += $(ZLIBCPP) $(LZMACPP) xzstd : LDFLAGS += $(ZLIBLD) $(LZMALD) zstd zstd-nogz xzstd : CPPFLAGS += -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT) -zstd zstd-nogz xzstd : $(ZSTDLIB_OBJ) zstdcli.o fileio.o bench.o datagen.o dibio.o +zstd zstd-nogz xzstd : $(ZSTDLIB_FILES) zstdcli.o fileio.o bench.o datagen.o dibio.o @echo "$(THREAD_MSG)" @echo "$(ZLIB_MSG)" @echo "$(LZMA_MSG)"