Class DeflateParameters
- java.lang.Object
-
- kala.compress.compressors.deflate.DeflateParameters
-
public class DeflateParameters extends java.lang.ObjectParameters for the Deflate compressor.- Since:
- 1.9
-
-
Field Summary
Fields Modifier and Type Field Description private intcompressionLevel(package private) static intMAX_LEVEL(package private) static intMIN_LEVELprivate booleanzlibHeader
-
Constructor Summary
Constructors Constructor Description DeflateParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCompressionLevel()The compression level.voidsetCompressionLevel(int compressionLevel)Sets the compression level.voidsetWithZlibHeader(boolean zlibHeader)Sets the zlib header presence parameter.booleanwithZlibHeader()Whether or not the zlib header shall be written (when compressing) or expected (when decompressing).
-
-
-
Field Detail
-
MAX_LEVEL
static final int MAX_LEVEL
- See Also:
- Constant Field Values
-
MIN_LEVEL
static final int MIN_LEVEL
- See Also:
- Constant Field Values
-
zlibHeader
private boolean zlibHeader
-
compressionLevel
private int compressionLevel
-
-
Method Detail
-
getCompressionLevel
public int getCompressionLevel()
The compression level.- Returns:
- the compression level
- See Also:
setCompressionLevel(int)
-
setCompressionLevel
public void setCompressionLevel(int compressionLevel)
Sets the compression level.- Parameters:
compressionLevel- the compression level (between 0 and 9)- See Also:
Deflater.NO_COMPRESSION,Deflater.BEST_SPEED,Deflater.DEFAULT_COMPRESSION,Deflater.BEST_COMPRESSION
-
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
-
-