RFR: 8231093: Document the ZIP FS properties noCompression and releaseVersion
Martin Buchholz
martinrb at google.com
Fri Sep 20 15:54:31 UTC 2019
Thanks.
When we document these properties, we should make it clearer what the
default behavior is, e.g. what happens if a multi-release jar is used and
releaseVersion is unspecified.
It's unfortunate that we have (at least) 3 different parallel APIs for jar
creation - the jar CLI, system properties for zipfs and java methods for
ZipOutputStream. Looking at
https://download.java.net/java/early_access/jdk14/docs/api/java.base/java/util/zip/ZipOutputStream.html#setMethod(int)
I can see different terminology "set METHOD to DEFLATED" rather than set a
"noCompression" bit.
Hopefully someday we will add support for other compression methods (PKWARE
supports many more) and then having only a boolean will look poorly planned.
Maybe instead "compressionMethod" with current values "STORED" "DEFLATED".
https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
4.4.5 compression method: (2 bytes)
0 - The file is stored (no compression)
1 - The file is Shrunk
2 - The file is Reduced with compression factor 1
3 - The file is Reduced with compression factor 2
4 - The file is Reduced with compression factor 3
5 - The file is Reduced with compression factor 4
6 - The file is Imploded
7 - Reserved for Tokenizing compression algorithm
8 - The file is Deflated
9 - Enhanced Deflating using Deflate64(tm)
10 - PKWARE Data Compression Library Imploding (old IBM TERSE)
11 - Reserved by PKWARE
12 - File is compressed using BZIP2 algorithm
13 - Reserved by PKWARE
14 - LZMA
15 - Reserved by PKWARE
16 - IBM z/OS CMPSC Compression
17 - Reserved by PKWARE
18 - File is compressed using IBM TERSE (new)
19 - IBM LZ77 z Architecture (PFS)
96 - JPEG variant
97 - WavPack compressed data
98 - PPMd version I, Rev 1
99 - AE-x encryption marker (see APPENDIX E)
On Fri, Sep 20, 2019 at 4:10 AM Lance Andersen <lance.andersen at oracle.com>
wrote:
> Hi all,
>
> Please review the fix for 8231093 which documents the ZIP FS properties
> “noCompression" and “releaseVersion”. The property “multi-release” has
> been renamed to “releaseVersion” as the supported property while ZIP FS
> still checks for “multi-release” if “releaseVersion” is not found.
>
> The webrev can be found at:
> http://cr.openjdk.java.net/~lancea/8231093/webrev.00/index.html.
>
> The CSR can be found at: https://bugs.openjdk.java.net/browse/JDK-8231248
>
> It is important to note that there are additional ZIP FS properties that
> will remain undocumented/supportted at this time until we have adequate
> testing of the properties and determine if they add value to the developer
> community.
>
> Best,
> Lance
>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen|
> Principal Member of Technical Staff | +1.781.442.2037 <(781)%20442-2037>
> Oracle Java Engineering
> 1 Network Drive
> Burlington, MA 01803
> Lance.Andersen at oracle.com
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190920/fe1d348f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oracle_sig_logo.gif
Type: image/gif
Size: 658 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190920/fe1d348f/oracle_sig_logo-0001.gif>
More information about the nio-dev
mailing list