Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zstd is verbose by default #1132

Closed
planet36 opened this issue May 13, 2018 · 3 comments
Closed

zstd is verbose by default #1132

planet36 opened this issue May 13, 2018 · 3 comments

Comments

@planet36
Copy link

$ 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.

@Cyan4973
Copy link
Contributor

Cyan4973 commented May 13, 2018

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 :

  • User will want to know if some progression is actually happening, and also have a rough idea of how much waiting is needed before processing ends. A blinking cursor falls short of this objective : the program could actually be stuck in an infinite loop ! Waiting with no feedback is therefore a bit more "stressful".
  • User is assumed to be interested in the compression outcome that was manually requested, hence a quick summary is displayed at the end.

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.

@EdoaLive
Copy link

EdoaLive commented Nov 7, 2018

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.

@Cyan4973
Copy link
Contributor

Cyan4973 commented Nov 7, 2018

This capability does not exist yet.
There is a similar request at #1371 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants