Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8301124

Align jlink's --compress option with jmod's --compress option

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 21
    • tools
    • None
    • minimal
    • Existing values (0, 1, 2) to `--compress` options are supported but deprecated for removal.
    • add/remove/modify command line option
    • JDK

      Summary

      Changing the jlink --compress flags to align with the jmod tool.

      Problem

      The jlink compression flags are currently arbitrary values (0|1|2) and correspond to unrelated types of compression (none, string sharing, zip). This is out of alignment with the jmod tool, which uses standard unix-style zip compression levels.

      Solution

      Deprecate the existing "none" (0), "string sharing" (1), and zip (2) flag values. Add support for UNIX-style zip-[0-9] flags. Newly supported values will be prepended by "zip-" and be in the numeric range 0-9. Eg "zip-0, zip-1, zip-2, ... etc."

      Specification

      Standard usage from --list-plugins

        --compress <compress>             Compression to use in compressing resources:
                                          Accepted values are:
                                          zip-[0-9], where zip-0 provides no compression,
                                          and zip-9 provides the best compression.
                                          Default is zip-6.

      Help Usage:

        --compress <compress>             Compression to use in compressing resources:
                                          Accepted values are:
                                          zip-[0-9], where zip-0 provides no compression,
                                          and zip-9 provides the best compression.
                                          Default is zip-6.
                                          Deprecated values to be removed in a future release:
                                          0:  No compression. Equivalent to zip-0.
                                          1:  Constant String Sharing
                                          2:  Equivalent to zip-6.

      When jlink is invoked with --compress 0 or 1 or 2 option, a warning will be emitted about this deprecated value may be removed in a future release.

            igraves Ian Graves
            mr Mark Reinhold
            Alan Bateman, Mandy Chung
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: