public class Deflater extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BEST_COMPRESSION |
static int |
BEST_SPEED |
static int |
DEFAULT_COMPRESSION |
static int |
DEFAULT_STRATEGY |
static int |
DEFLATED |
static int |
FILTERED |
static int |
HUFFMAN_ONLY |
static int |
NO_COMPRESSION |
Constructor and Description |
---|
Deflater() |
Deflater(int lvl) |
Deflater(int lvl,
boolean noHeader) |
Modifier and Type | Method and Description |
---|---|
int |
deflate(byte[] buf) |
int |
deflate(byte[] buf,
int off,
int len)
if a Header is expected we check if dictionary is was passed
|4 bits cinfo|4 bits cm|2 bits Flevel|1 bit FDICT|5bits checksum|
cinfo = compression info if CM=8 then cinfo = log2(LZ77 window size) - 8
else cinfo is not defined (0)
cm = compression method ...
|
void |
end() |
protected void |
finalize()
The default finalizer does nothing.
|
void |
finish() |
boolean |
finished() |
int |
getAdler() |
int |
getTotalIn() |
int |
getTotalOut() |
boolean |
needsInput() |
void |
reset() |
void |
setDictionary(byte[] buf) |
void |
setDictionary(byte[] buf,
int off,
int len) |
void |
setInput(byte[] buf) |
void |
setInput(byte[] buf,
int off,
int len) |
void |
setLevel(int lvl) |
void |
setStrategy(int strat) |
public static final int BEST_COMPRESSION
public static final int BEST_SPEED
public static final int DEFAULT_COMPRESSION
public static final int DEFAULT_STRATEGY
public static final int DEFLATED
public static final int FILTERED
public static final int HUFFMAN_ONLY
public static final int NO_COMPRESSION
public Deflater()
public Deflater(int lvl)
public Deflater(int lvl, boolean noHeader)
public int getTotalIn()
public int getTotalOut()
public int getAdler()
public int deflate(byte[] buf)
public void setInput(byte[] buf)
public void setDictionary(byte[] buf)
public boolean finished()
public boolean needsInput()
public void setLevel(int lvl)
public void setStrategy(int strat)
public void setInput(byte[] buf, int off, int len)
public int deflate(byte[] buf, int off, int len)
public void reset()
public void setDictionary(byte[] buf, int off, int len)
protected void finalize()
Object
public void finish()
public void end()