Proposal: jar option to disable compression for selected file extensions

Archie Cobbs archie.cobbs at gmail.com
Mon Dec 16 14:42:57 UTC 2024


On Mon, Dec 16, 2024 at 5:39 AM Eirik Bjørsnøs <eirbjo at gmail.com> wrote:

> I propose that we add a new option, tentatively named "--no-compress-ext",
> which would take a colon-separated list of file extensions to disable ZIP
> compression for:
>
> jar --create --file archive.jar --no-compress-ext=.jpg:.png:.gz -C dir .
>

This sounds like a good idea to me. Thumbs up.

I specifically do not suggest that we should define any kind of default for
> this option. This should be entirely up to the user.


Agree with that, though one could argue that maybe there should be an
"available default", e.g.

    --standard-compress-exts    Apply a standard set of no-compression
extensions.
                                Equivalent to:
--no-compress-ext=.jpg:.png:.gz

But that would introduce a new debate about what that list should be, and
how it should evolve over time (possibly introducing variability into
people's builds). So again probably best to completely avoid any "opinions"
and leave all decisions up to the user.

-Archie

-- 
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20241216/3a860069/attachment-0001.htm>


More information about the core-libs-dev mailing list