com.go.trove.util
Class Deflater
java.lang.Object
|
+--com.go.trove.util.Deflater
- public class Deflater
- extends java.lang.Object
A zlib deflater interface that matches Deflater,
except additional flush operations are supported. This class requires native
code support and looks for a library named "TroveZip".
- Version:
- 2 , 01/06/13
- Author:
- Brian S O'Neill
|
Method Summary |
int |
deflate(byte[] b)
|
int |
deflate(byte[] b,
int off,
int len)
|
void |
end()
|
protected void |
finalize()
|
void |
finish()
When called, indicates that compression should end with the current
contents of the input buffer. |
boolean |
finished()
|
void |
flush()
When called, indicates that the current input buffer contents should be
flushed out when deflate is next called. |
void |
fullFlush()
When called, indicates that the current input buffer contents should be
flushed out when deflate is next called, but all compression information
up to this point is cleared. |
int |
getAdler()
|
int |
getTotalIn()
|
int |
getTotalOut()
|
boolean |
isNoWrap()
|
boolean |
needsInput()
|
void |
reset()
|
void |
setDictionary(byte[] b)
|
void |
setDictionary(byte[] b,
int off,
int len)
|
void |
setInput(byte[] b)
|
void |
setInput(byte[] b,
int off,
int len)
|
void |
setLevel(int level)
|
void |
setStrategy(int strategy)
|
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFLATED
public static final int DEFLATED
NO_COMPRESSION
public static final int NO_COMPRESSION
BEST_SPEED
public static final int BEST_SPEED
BEST_COMPRESSION
public static final int BEST_COMPRESSION
DEFAULT_COMPRESSION
public static final int DEFAULT_COMPRESSION
FILTERED
public static final int FILTERED
HUFFMAN_ONLY
public static final int HUFFMAN_ONLY
DEFAULT_STRATEGY
public static final int DEFAULT_STRATEGY
Deflater
public Deflater(int level,
boolean nowrap)
Deflater
public Deflater(int level)
Deflater
public Deflater()
isNoWrap
public boolean isNoWrap()
setInput
public void setInput(byte[] b,
int off,
int len)
setInput
public void setInput(byte[] b)
setDictionary
public void setDictionary(byte[] b,
int off,
int len)
setDictionary
public void setDictionary(byte[] b)
setStrategy
public void setStrategy(int strategy)
setLevel
public void setLevel(int level)
needsInput
public boolean needsInput()
flush
public void flush()
- When called, indicates that the current input buffer contents should be
flushed out when deflate is next called.
fullFlush
public void fullFlush()
- When called, indicates that the current input buffer contents should be
flushed out when deflate is next called, but all compression information
up to this point is cleared.
finish
public void finish()
- When called, indicates that compression should end with the current
contents of the input buffer. Deflate must be called to get the final
compressed bytes.
finished
public boolean finished()
deflate
public int deflate(byte[] b,
int off,
int len)
deflate
public int deflate(byte[] b)
getAdler
public int getAdler()
getTotalIn
public int getTotalIn()
getTotalOut
public int getTotalOut()
reset
public void reset()
end
public void end()
finalize
protected void finalize()
- Overrides:
finalize in class java.lang.Object