Top Description Fields Constructors Methods
org.apache.commons.compress.archivers.zip

public final Enum ZipMethod

extends Enum<ZipMethod>
Class Inheritance
Imports
java.util.Collections, .HashMap, .Map, java.util.zip.ZipEntry

List of known compression methods Many of these methods are currently not supported by commons compress
Since
1.5

Field Summary

Modifier and TypeField and Description
public static final ZipMethod
AES_ENCRYPTED

Compression Method 99 for AES encryption.

public static final ZipMethod
BZIP2

Compression Method 12 for bzip2.

private final int
private static final Map<Integer, ZipMethod>
public static final ZipMethod
DEFLATED

Compression method 8 for compressed (deflated) entries.

public static final ZipMethod
ENHANCED_DEFLATED

Compression Method 9 for enhanced deflate.

public static final ZipMethod
EXPANDING_LEVEL_1

Reduced with compression factor 1.

public static final ZipMethod
EXPANDING_LEVEL_2

Reduced with compression factor 2.

public static final ZipMethod
EXPANDING_LEVEL_3

Reduced with compression factor 3.

public static final ZipMethod
EXPANDING_LEVEL_4

Reduced with compression factor 4.

public static final ZipMethod
IMPLODING

Imploding.

public static final ZipMethod
JPEG

Compression Method 96 for Jpeg compression.

public static final ZipMethod
LZMA

Compression Method 14 for LZMA.

public static final ZipMethod
PKWARE_IMPLODING

PKWARE Data Compression Library Imploding.

public static final ZipMethod
PPMD

Compression Method 98 for PPMd.

public static final ZipMethod
STORED

Compression method 0 for uncompressed entries.

public static final ZipMethod
TOKENIZATION

Tokenization.

public static final ZipMethod
UNKNOWN

Unknown compression method.

pack-priv static final int
public static final ZipMethod
UNSHRINKING

UnShrinking.

public static final ZipMethod
WAVPACK

Compression Method 97 for WavPack.

public static final ZipMethod
XZ

Compression Method 95 for XZ.

Constructor Summary

AccessConstructor and Description
private
private
ZipMethod(final int code)

private constructor for enum style class.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

an integer code for the method
getCode
()

the code of the compression method.

public static ZipMethod

Returns:

the ZipMethod for the given code or null if the method is not known.
getMethodByCode
(final int
the code
code
)

returns the ZipMethod for the given code or null if the method is not known.

public static ZipMethod
public static ZipMethod[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AES_ENCRYPTEDback to summary
public static final ZipMethod AES_ENCRYPTED

Compression Method 99 for AES encryption.

See Also
https://www.winzip.com/wz54.htm
BZIP2back to summary
public static final ZipMethod BZIP2

Compression Method 12 for bzip2.

See Also
https://www.winzip.com/wz54.htm
codeback to summary
private final int code
codeToEnumback to summary
private static final Map<Integer, ZipMethod> codeToEnum
DEFLATEDback to summary
public static final ZipMethod DEFLATED

Compression method 8 for compressed (deflated) entries.

See Also
ZipEntry#DEFLATED
ENHANCED_DEFLATEDback to summary
public static final ZipMethod ENHANCED_DEFLATED

Compression Method 9 for enhanced deflate.

See Also
https://www.winzip.com/wz54.htm
EXPANDING_LEVEL_1back to summary
public static final ZipMethod EXPANDING_LEVEL_1

Reduced with compression factor 1.

See Also
Explanation of fields: compression method: (2 bytes)
EXPANDING_LEVEL_2back to summary
public static final ZipMethod EXPANDING_LEVEL_2

Reduced with compression factor 2.

See Also
Explanation of fields: compression method: (2 bytes)
EXPANDING_LEVEL_3back to summary
public static final ZipMethod EXPANDING_LEVEL_3

Reduced with compression factor 3.

See Also
Explanation of fields: compression method: (2 bytes)
EXPANDING_LEVEL_4back to summary
public static final ZipMethod EXPANDING_LEVEL_4

Reduced with compression factor 4.

See Also
Explanation of fields: compression method: (2 bytes)
IMPLODINGback to summary
public static final ZipMethod IMPLODING

Imploding.

See Also
Explanation of fields: compression method: (2 bytes)
JPEGback to summary
public static final ZipMethod JPEG

Compression Method 96 for Jpeg compression.

See Also
https://www.winzip.com/wz54.htm
LZMAback to summary
public static final ZipMethod LZMA

Compression Method 14 for LZMA.

See Also
https://www.7-zip.org/sdk.html, https://www.winzip.com/wz54.htm
PKWARE_IMPLODINGback to summary
public static final ZipMethod PKWARE_IMPLODING

PKWARE Data Compression Library Imploding.

See Also
https://www.winzip.com/wz54.htm
PPMDback to summary
public static final ZipMethod PPMD

Compression Method 98 for PPMd.

See Also
https://www.winzip.com/wz54.htm
STOREDback to summary
public static final ZipMethod STORED

Compression method 0 for uncompressed entries.

See Also
ZipEntry#STORED
TOKENIZATIONback to summary
public static final ZipMethod TOKENIZATION

Tokenization.

See Also
Explanation of fields: compression method: (2 bytes)
UNKNOWNback to summary
public static final ZipMethod UNKNOWN

Unknown compression method.

UNKNOWN_CODEback to summary
pack-priv static final int UNKNOWN_CODE
UNSHRINKINGback to summary
public static final ZipMethod UNSHRINKING

UnShrinking. dynamic Lempel-Ziv-Welch-Algorithm

See Also
Explanation of fields: compression method: (2 bytes)
WAVPACKback to summary
public static final ZipMethod WAVPACK

Compression Method 97 for WavPack.

See Also
https://www.winzip.com/wz54.htm
XZback to summary
public static final ZipMethod XZ

Compression Method 95 for XZ.

See Also
https://www.winzip.com/wz54.htm

Constructor Detail

ZipMethodback to summary
private ZipMethod()
ZipMethodback to summary
private ZipMethod(final int code)

private constructor for enum style class.

Method Detail

getCodeback to summary
public int getCode()

the code of the compression method.

Returns:int

an integer code for the method

See Also
ZipArchiveEntry#getMethod()
getMethodByCodeback to summary
public static ZipMethod getMethodByCode(final int code)

returns the ZipMethod for the given code or null if the method is not known.

Parameters
code:int

the code

Returns:ZipMethod

the ZipMethod for the given code or null if the method is not known.

valueOfback to summary
public static ZipMethod valueOf(String name)
valuesback to summary
public static ZipMethod[] values()