Package net.lingala.zip4j.model.enums
Enum CompressionLevel
- All Implemented Interfaces:
Serializable
,Comparable<CompressionLevel>
Indicates the level of compression for the DEFLATE compression method
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionLevel 3 Deflate compressionLevel 2 Deflate compressionLevel 1 Deflate compression.Level 6 Deflate compressionLevel 7 Deflate compressionLevel 4 Deflate compressionLevel 0 - No compressionLevel 5 Deflate compression.Level 8 Deflate compressionLevel 9 Deflate compression. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getLevel()
Get the Deflate compression level (0-9) for this CompressionLevelstatic CompressionLevel
Returns the enum constant of this type with the specified name.static CompressionLevel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NO_COMPRESSION
Level 0 - No compression -
FASTEST
Level 1 Deflate compression. Fastest compression. -
FASTER
Level 2 Deflate compression -
FAST
Level 3 Deflate compression -
MEDIUM_FAST
Level 4 Deflate compression -
NORMAL
Level 5 Deflate compression. A compromise between speed and compression level. -
HIGHER
Level 6 Deflate compression -
MAXIMUM
Level 7 Deflate compression -
PRE_ULTRA
Level 8 Deflate compression -
ULTRA
Level 9 Deflate compression. Highest compression.
-
-
Field Details
-
level
private final int level
-
-
Constructor Details
-
CompressionLevel
private CompressionLevel(int level)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getLevel
public int getLevel()Get the Deflate compression level (0-9) for this CompressionLevel- Returns:
- the deflate compression level
-