Java java.util.zip Deflater fields, constructors, methods, implement or subclass

Example usage for Java java.util.zip Deflater fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.zip Deflater.

The text is from its open source code.

Subclass

java.util.zip.Deflater has subclasses.
Click this link to see all its subclasses.

Field

booleanfinish
intDEFLATED
Compression method for the deflate algorithm (the only one currently supported).
intNO_COMPRESSION
Compression level for no compression.
intBEST_SPEED
Compression level for fastest compression.
intBEST_COMPRESSION
Compression level for best compression.
intDEFAULT_COMPRESSION
Default compression level.
intHUFFMAN_ONLY
Compression strategy for Huffman coding only.
intDEFAULT_STRATEGY
Default compression strategy.
intSYNC_FLUSH
Compression flush mode used to flush out all pending output; may degrade compression for some compression algorithms.

Constructor

Deflater()
Creates a new compressor with the default compression level.
Deflater(int level, boolean nowrap)
Creates a new compressor using the specified compression level.
Deflater(int level)
Creates a new compressor using the specified compression level.

Method

intdeflate(byte[] output)
Compresses the input data and fills specified buffer with compressed data.
intdeflate(ByteBuffer output)
Compresses the input data and fills specified buffer with compressed data.
intdeflate(byte[] output, int off, int len)
Compresses the input data and fills specified buffer with compressed data.
intdeflate(byte[] output, int off, int len, int flush)
Compresses the input data and fills the specified buffer with compressed data.
voidend()
Closes the compressor and discards any unprocessed input.
booleanfinished()
Returns true if the end of the compressed data output stream has been reached.
longgetBytesRead()
Returns the total number of uncompressed bytes input so far.
longgetBytesWritten()
Returns the total number of compressed bytes output so far.
ClassgetClass()
Returns the runtime class of this Object .
intgetTotalOut()
Returns the total number of compressed bytes output so far.
booleanneedsInput()
Returns true if no data remains in the input buffer.
voidreset()
Resets deflater so that a new set of input data can be processed.
voidsetDictionary(byte[] dictionary)
Sets preset dictionary for compression.
voidsetDictionary(ByteBuffer dictionary)
Sets preset dictionary for compression.
voidsetInput(byte[] input)
Sets input data for compression.
voidsetInput(ByteBuffer input)
Sets input data for compression.
voidsetInput(byte[] input, int off, int len)
Sets input data for compression.
voidsetLevel(int level)
Sets the compression level to the specified value.
voidsetStrategy(int strategy)
Sets the compression strategy to the specified value.