facebook / facebook/zstd

More verbosity without welcome message

Đang mở
#4,565 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C
Star
27.9k
Fork
2.6k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
8

Mô tả

When compressing from `stdin`, it would be nice with an option to see the progress without the `WELCOME_MESSAGE`.

Especially in scripts that invoke `zstd` many times.

Current behaviour:
```
ls -l |zstd -9 -v > ll.zst
*** Zstandard CLI (64-bit) v1.6.0, by Yann Collet ***
/*stdin*\ : 36.23% ( 1.17 KiB => 434 B, /*stdout*\)
```

Proposed:
```
ls -l |zstd -9 -v > ll.zst
/*stdin*\ : 36.23% ( 1.17 KiB => 434 B, /*stdout*\)
```

```
ls -l |zstd -9 > ll.zst
[shows nothing - both before and after change]
```

**Proposed simple solution:**
```diff
diff --git a/programs/zstdcli.c b/programs/zstdcli.c
index 01760ff8..86ea5a10 100644
--- a/programs/zstdcli.c
+++ b/programs/zstdcli.c
@@ -1335,7 +1335,7 @@ int main(int argCount, const char* argv[])
}

/* Welcome message (if verbose) */
- DISPLAYLEVEL(3, WELCOME_MESSAGE);
+ DISPLAYLEVEL(4, WELCOME_MESSAGE);

#ifdef ZSTD_MULTITHREAD
if ((operation==zom_decompress) && (setThreads_non1)) {
```
so that two or more `-v`'s are needed for the welcome message to be shown.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.