$ zstd --version
* zstd command line interface 64-bits v1.3.3, by Yann Collet *
No verbose output should be displayed unless the "--verbose" option is given.
I know the man page says:
When compressing a single file, zstd displays progress notifications and result summary by default. Use -q to turn them off.
Other compression programs (e.g. gzip, bzip2, xz, lzip) are not verbose by default.
It's a deliberate choice of zstd
interface : put human interaction first.
When a user invests its time manually typing a command to compress a file or a stream, there are a bunch of related expectations :
This is different from a program which puts "automated scripting first". In which case, compression operation is just one part of a larger pipeline, and all those feedback become useless, if not annoying. Hence it's better if they are not present.
In both cases there are solutions : programs like zstd
which favor human interaction nonetheless allow command -q
to silence feedback for scripts. Programs which favor script integration generally provide a way for human users to state their will to receive some feedback, through -v
command typically (note that, in many cases, progression feedback is not part of contract, only end summary).
So the differences end up being rather small.
At the end of the day, I believe the choice made for zstd
is a bit better : it provides a more "inviting" first experience, featuring more feedback signals. And first experience is very important before a user starts to consider "advanced" scenarios, such as embedding compression into a larger processing stage.
As for script integration, in most cases, compressors are invoked through some variable. In which case, setting something like compress = zstd -q
is not much more different than setting compress = zstd
.
Hi,
I'm using zstd in a script. I'd like to see some feedback like compression percentage in the log files, but the control characters are not well accepted (e.g. ^M, progress string repetitions).
Which zstd options should I use? I already tried "-q -v
" but with no results.
This capability does not exist yet.
There is a similar request at #1371 .
Most helpful comment
It's a deliberate choice of
zstd
interface : put human interaction first.When a user invests its time manually typing a command to compress a file or a stream, there are a bunch of related expectations :
This is different from a program which puts "automated scripting first". In which case, compression operation is just one part of a larger pipeline, and all those feedback become useless, if not annoying. Hence it's better if they are not present.
In both cases there are solutions : programs like
zstd
which favor human interaction nonetheless allow command-q
to silence feedback for scripts. Programs which favor script integration generally provide a way for human users to state their will to receive some feedback, through-v
command typically (note that, in many cases, progression feedback is not part of contract, only end summary).So the differences end up being rather small.
At the end of the day, I believe the choice made for
zstd
is a bit better : it provides a more "inviting" first experience, featuring more feedback signals. And first experience is very important before a user starts to consider "advanced" scenarios, such as embedding compression into a larger processing stage.As for script integration, in most cases, compressors are invoked through some variable. In which case, setting something like
compress = zstd -q
is not much more different than settingcompress = zstd
.