Top Description Fields Constructors Methods
org.apache.commons.compress.compressors.deflate

public Class DeflateParameters

extends Object
Class Inheritance
Imports
java.util.zip.Deflater

Parameters for the Deflate compressor.
Since
1.9

Field Summary

Modifier and TypeField and Description
private int
pack-priv static final int
pack-priv static final int
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the compression level
getCompressionLevel
()

The compression level.

public void
setCompressionLevel(final int
the compression level (between 0 and 9)
compressionLevel
)

Sets the compression level.

public void
setWithZlibHeader(final boolean
true if zlib header shall be written
zlibHeader
)

Sets the zlib header presence parameter.

public boolean

Returns:

true if zlib header shall be written
withZlibHeader
()

Whether or not the zlib header shall be written (when compressing) or expected (when decompressing).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

compressionLevelback to summary
private int compressionLevel
MAX_LEVELback to summary
pack-priv static final int MAX_LEVEL
MIN_LEVELback to summary
pack-priv static final int MIN_LEVEL
zlibHeaderback to summary
private boolean zlibHeader

Constructor Detail

DeflateParametersback to summary
public DeflateParameters()

Method Detail

getCompressionLevelback to summary
public int getCompressionLevel()

The compression level.

Returns:int

the compression level

See Also
setCompressionLevel
setCompressionLevelback to summary
public void setCompressionLevel(final int compressionLevel)

Sets the compression level.

Parameters
compressionLevel:int

the compression level (between 0 and 9)

See Also
Deflater#NO_COMPRESSION, Deflater#BEST_SPEED, Deflater#DEFAULT_COMPRESSION, Deflater#BEST_COMPRESSION
setWithZlibHeaderback to summary
public void setWithZlibHeader(final 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:boolean

true if zlib header shall be written

withZlibHeaderback to summary
public boolean withZlibHeader()

Whether or not the zlib header shall be written (when compressing) or expected (when decompressing).

Returns:boolean

true if zlib header shall be written