Zstd: Add information about supported formats to cli's output

Created on 19 Jul 2017  路  15Comments  路  Source: facebook/zstd

This allows parsing the information if necessary and is informative to the user as well.

enhancement

All 15 comments

That's a good point @ib,
though, to be complete, we would probably have to mention
when cli supports .gz and .xz formats too

though, to be complete, we would probably have to mention
when cli supports .gz and .xz formats too

This can already easily be parsed and seen from the cli's help output (--format=), but a new and compact Supports: line would be okay as well.

Something like this:

*** zstd command line interface 32-bits v1.3.0, by Yann Collet
    supporting zstd formats v0.4+, gzip, lzma, xz ***

or this:

*** zstd command line interface 32-bits v1.3.0, by Yann Collet
*** supporting zstd formats v0.4+, gzip, lzma, xz

Yes, something like the 2nd example looks great

Here you are.

Thanks @ib, it's pretty good,
though note that ZSTD_LEGACY_SUPPORT==0 means "no legacy support"

Oops, missed the header (which btw had no range check so far).

On top of that some beautification.

@Cyan4973, are you going to apply this?

yes, it's in the list

The proposed patch makes zstdcli.c dependant on zstd_legacy.h.
However, it should be possible to compile zstdcli.c without legacy support, hence without availability of zstd_legacy.h.

Let's find another way...

In your patch, you propose this information to be displayed under usage_advanced(), which is triggered by -h command. In which case, it also displays additional instructions.

I was considering to trigger it under "verbose Version", which would be triggered by -vV. It would basically limit the output to the 2 lines mentioned.
What do you think ?

-vV sounds good to me.

This should do the job.

Thanks @ib .

806 implements the requested feature, based on your suggested patch.

Branch displayVersion can be used to test it.

Was this page helpful?
0 / 5 - 0 ratings