Class DeflateParameters
java.lang.Object
org.apache.commons.compress.compressors.deflate.DeflateParameters
Parameters for the Deflate compressor.
- Since:
- 1.9
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int(package private) static final int(package private) static final intprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe compression level.voidsetCompressionLevel(int compressionLevel) Sets the compression level.voidsetWithZlibHeader(boolean zlibHeader) Sets the zlib header presence parameter.booleanWhether or not the zlib header shall be written (when compressing) or expected (when decompressing).
-
Field Details
-
MAX_LEVEL
static final int MAX_LEVEL- See Also:
-
MIN_LEVEL
static final int MIN_LEVEL- See Also:
-
zlibHeader
private boolean zlibHeader -
compressionLevel
private int compressionLevel
-
-
Constructor Details
-
DeflateParameters
public DeflateParameters()
-
-
Method Details
-
getCompressionLevel
public int getCompressionLevel()The compression level.- Returns:
- the compression level
- See Also:
-
setCompressionLevel
public void setCompressionLevel(int compressionLevel) Sets the compression level.- Parameters:
compressionLevel- the compression level (between 0 and 9)- See Also:
-
setWithZlibHeader
public void setWithZlibHeader(boolean zlibHeader) Sets the zlib header presence parameter.This affects whether or not the zlib header will be written (when compressing) or expected (when decompressing).
- Parameters:
zlibHeader- true if zlib header shall be written
-
withZlibHeader
public boolean withZlibHeader()Whether or not the zlib header shall be written (when compressing) or expected (when decompressing).- Returns:
- true if zlib header shall be written
-