From: Junio C Hamano <gitster@pobox.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: git@vger.kernel.org, vagabon.xyz@gmail.com,
"Jeff King" <peff@peff.net>, "René Scharfe" <l.s.r@web.de>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH v3] archive: describe compression level option
Date: Mon, 18 Oct 2021 10:00:49 -0700 [thread overview]
Message-ID: <xmqq8ryqxo72.fsf@gitster.g> (raw)
In-Reply-To: <20211018123822.541406-1-bagasdotme@gmail.com> (Bagas Sanjaya's message of "Mon, 18 Oct 2021 19:38:22 +0700")
Bagas Sanjaya <bagasdotme@gmail.com> writes:
> Describe the only extra option in `git archive`, that is the compression
> level option. Previously this option is only described for zip backend;
> add description also for tar backend.
Almost there.
I think saying just a short "-<number>" would be more appropriate.
Both descriptions are clear that they are talking about a number
given by the user, and their purpose is to describe what the number
means. I do not see much point in using such a long label, which
makes the leading '-' less stand out.
For an added bonus, use -<digit> for zip, and use -<number> for tar.
> zip
> ~~~
> +-<compression level number>::
> + Specify compression level. Higher values enables better ratio at
> + the expense of longer time. Supported values are from `-0`
> + (store-only) to `-9` (best ratio). Default is `-6` if isn't
> + specified.
I wondered how Info-zip describes what -9 is and how they say phrase
it is quite interesting.
Regulate the speed of compression using the specified digit #,
where -0 indicates no compression (store all files), -1
indicates the fastest compression speed (less compression) and
-9 indicates the slowest compression speed (optimal compression,
ignores the suffix list). The default compression level is -6.
Notice that they do not make much promise on the resulting size;
they only talk about speed. At the slowest speed, the tool is
allowed to spend more time to explore smaller size, but it may not
always be successful, I guess, to achieve the "best compression", so
it is a very defensive documentation, but I doubt if it is helful to
its readers. Compared to that I think the proposed "best ratio"
much more clearly conveys the intention (i.e. "we aim for smaller
size")---it would probably be even better to say "smaller size", as
there may be many "ratios" in the world and it is not immediately
obvious that we are talking about resulting size being small if we
do not say so (also "smaller" or "smallest" is more explicit than
"best"---the readers don't have to think which between smaller and
larger is better).
> +tar
> +~~~
> +-<compression level number>::
> + Specify compression level. The value will be passed to the
> + compression command configured in `tar.<format>.command`. See
> + manual page of the configured command for the list of supported
> + levels and the default level if this option isn't specified.
OK.
Thanks.
prev parent reply other threads:[~2021-10-18 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 12:38 [PATCH v3] archive: describe compression level option Bagas Sanjaya
2021-10-18 17:00 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq8ryqxo72.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=peff@peff.net \
--cc=vagabon.xyz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).