Package net.lingala.zip4j.model.enums
Enum CompressionLevel
- java.lang.Object
-
- java.lang.Enum<CompressionLevel>
-
- net.lingala.zip4j.model.enums.CompressionLevel
-
- All Implemented Interfaces:
Serializable
,Comparable<CompressionLevel>
public enum CompressionLevel extends Enum<CompressionLevel>
Indicates the level of compression for the DEFLATE compression method
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FAST
Level 3 Deflate compressionFASTER
Level 2 Deflate compressionFASTEST
Level 1 Deflate compression.HIGHER
Level 6 Deflate compressionMAXIMUM
Level 7 Deflate compressionMEDIUM_FAST
Level 4 Deflate compressionNO_COMPRESSION
Level 0 - No compressionNORMAL
Level 5 Deflate compression.PRE_ULTRA
Level 8 Deflate compressionULTRA
Level 9 Deflate compression.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLevel()
Get the Deflate compression level (0-9) for this CompressionLevelstatic CompressionLevel
valueOf(String name)
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 Detail
-
NO_COMPRESSION
public static final CompressionLevel NO_COMPRESSION
Level 0 - No compression
-
FASTEST
public static final CompressionLevel FASTEST
Level 1 Deflate compression. Fastest compression.
-
FASTER
public static final CompressionLevel FASTER
Level 2 Deflate compression
-
FAST
public static final CompressionLevel FAST
Level 3 Deflate compression
-
MEDIUM_FAST
public static final CompressionLevel MEDIUM_FAST
Level 4 Deflate compression
-
NORMAL
public static final CompressionLevel NORMAL
Level 5 Deflate compression. A compromise between speed and compression level.
-
HIGHER
public static final CompressionLevel HIGHER
Level 6 Deflate compression
-
MAXIMUM
public static final CompressionLevel MAXIMUM
Level 7 Deflate compression
-
PRE_ULTRA
public static final CompressionLevel PRE_ULTRA
Level 8 Deflate compression
-
ULTRA
public static final CompressionLevel ULTRA
Level 9 Deflate compression. Highest compression.
-
-
Method Detail
-
values
public static CompressionLevel[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CompressionLevel c : CompressionLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CompressionLevel valueOf(String name)
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
-
-