Package com.jcraft.jzlib
Class Deflate
- java.lang.Object
-
- com.jcraft.jzlib.Deflate
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class Deflate extends java.lang.Object implements java.lang.Cloneable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Deflate.Config
-
Field Summary
Fields Modifier and Type Field Description (package private) short
bi_buf
(package private) int
bi_valid
private static int
BL_CODES
(package private) short[]
bl_count
(package private) Tree
bl_desc
(package private) short[]
bl_tree
(package private) int
block_start
private static int
BlockDone
private static int
Buf_size
private static int
BUSY_STATE
private static Deflate.Config[]
config_table
(package private) int
d_buf
private static int
D_CODES
(package private) Tree
d_desc
(package private) byte
data_type
private static int
DEF_MEM_LEVEL
(package private) byte[]
depth
(package private) short[]
dyn_dtree
(package private) short[]
dyn_ltree
private static int
DYN_TREES
private static int
END_BLOCK
private static int
FAST
private static int
FINISH_STATE
private static int
FinishDone
private static int
FinishStarted
(package private) GZIPHeader
gheader
(package private) int
good_match
(package private) int
hash_bits
(package private) int
hash_mask
(package private) int
hash_shift
(package private) int
hash_size
(package private) short[]
head
(package private) int[]
heap
(package private) int
heap_len
(package private) int
heap_max
private static int
HEAP_SIZE
private static int
INIT_STATE
(package private) int
ins_h
(package private) byte[]
l_buf
private static int
L_CODES
(package private) Tree
l_desc
(package private) int
last_eob_len
(package private) int
last_flush
(package private) int
last_lit
private static int
LENGTH_CODES
(package private) int
level
(package private) int
lit_bufsize
private static int
LITERALS
(package private) int
lookahead
(package private) int
match_available
(package private) int
match_length
(package private) int
match_start
(package private) int
matches
private static int
MAX_BITS
(package private) int
max_chain_length
(package private) int
max_lazy_match
private static int
MAX_MATCH
private static int
MAX_MEM_LEVEL
private static int
MAX_WBITS
(package private) byte
method
private static int
MIN_LOOKAHEAD
private static int
MIN_MATCH
private static int
NeedMore
(package private) short[]
next_code
(package private) int
nice_match
(package private) int
opt_len
(package private) int
pending
(package private) byte[]
pending_buf
(package private) int
pending_buf_size
(package private) int
pending_out
private static int
PRESET_DICT
(package private) short[]
prev
(package private) int
prev_length
(package private) int
prev_match
private static int
REP_3_6
private static int
REPZ_11_138
private static int
REPZ_3_10
private static int
SLOW
(package private) int
static_len
private static int
STATIC_TREES
(package private) int
status
private static int
STORED
private static int
STORED_BLOCK
(package private) int
strategy
(package private) ZStream
strm
(package private) int
strstart
(package private) int
w_bits
(package private) int
w_mask
(package private) int
w_size
(package private) byte[]
window
(package private) int
window_size
(package private) int
wrap
private static int
Z_ASCII
private static int
Z_BINARY
private static int
Z_BUF_ERROR
private static int
Z_DATA_ERROR
private static int
Z_DEFAULT_COMPRESSION
private static int
Z_DEFAULT_STRATEGY
private static int
Z_DEFLATED
private static java.lang.String[]
z_errmsg
private static int
Z_ERRNO
private static int
Z_FILTERED
private static int
Z_FINISH
private static int
Z_FULL_FLUSH
private static int
Z_HUFFMAN_ONLY
private static int
Z_MEM_ERROR
private static int
Z_NEED_DICT
private static int
Z_NO_FLUSH
private static int
Z_OK
private static int
Z_PARTIAL_FLUSH
private static int
Z_STREAM_END
private static int
Z_STREAM_ERROR
private static int
Z_SYNC_FLUSH
private static int
Z_UNKNOWN
private static int
Z_VERSION_ERROR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
_tr_align()
(package private) void
_tr_flush_block(int buf, int stored_len, boolean eof)
(package private) void
_tr_stored_block(int buf, int stored_len, boolean eof)
(package private) boolean
_tr_tally(int dist, int lc)
(package private) void
bi_flush()
(package private) void
bi_windup()
(package private) int
build_bl_tree()
java.lang.Object
clone()
(package private) void
compress_block(short[] ltree, short[] dtree)
(package private) void
copy_block(int buf, int len, boolean header)
(package private) int
deflate(int flush)
(package private) int
deflate_fast(int flush)
(package private) int
deflate_slow(int flush)
(package private) int
deflate_stored(int flush)
(package private) static int
deflateCopy(ZStream dest, ZStream src)
(package private) int
deflateEnd()
(package private) int
deflateInit(int level)
(package private) int
deflateInit(int level, int bits)
(package private) int
deflateInit(int level, int bits, int memlevel)
private int
deflateInit(int level, int method, int windowBits, int memLevel, int strategy)
(package private) int
deflateParams(int _level, int _strategy)
(package private) int
deflateReset()
(package private) int
deflateSetDictionary(byte[] dictionary, int dictLength)
private byte[]
dup(byte[] buf)
private int[]
dup(int[] buf)
private short[]
dup(short[] buf)
(package private) void
fill_window()
(package private) void
flush_block_only(boolean eof)
(package private) GZIPHeader
getGZIPHeader()
(package private) void
init_block()
(package private) void
lm_init()
(package private) int
longest_match(int cur_match)
(package private) void
pqdownheap(short[] tree, int k)
(package private) void
put_byte(byte c)
(package private) void
put_byte(byte[] p, int start, int len)
(package private) void
put_short(int w)
(package private) void
putShortMSB(int b)
(package private) void
scan_tree(short[] tree, int max_code)
(package private) void
send_all_trees(int lcodes, int dcodes, int blcodes)
(package private) void
send_bits(int value, int length)
(package private) void
send_code(int c, short[] tree)
(package private) void
send_tree(short[] tree, int max_code)
(package private) void
set_data_type()
(package private) static boolean
smaller(short[] tree, int n, int m, byte[] depth)
(package private) void
tr_init()
-
-
-
Field Detail
-
MAX_MEM_LEVEL
private static final int MAX_MEM_LEVEL
- See Also:
- Constant Field Values
-
Z_DEFAULT_COMPRESSION
private static final int Z_DEFAULT_COMPRESSION
- See Also:
- Constant Field Values
-
MAX_WBITS
private static final int MAX_WBITS
- See Also:
- Constant Field Values
-
DEF_MEM_LEVEL
private static final int DEF_MEM_LEVEL
- See Also:
- Constant Field Values
-
STORED
private static final int STORED
- See Also:
- Constant Field Values
-
FAST
private static final int FAST
- See Also:
- Constant Field Values
-
SLOW
private static final int SLOW
- See Also:
- Constant Field Values
-
config_table
private static final Deflate.Config[] config_table
-
z_errmsg
private static final java.lang.String[] z_errmsg
-
NeedMore
private static final int NeedMore
- See Also:
- Constant Field Values
-
BlockDone
private static final int BlockDone
- See Also:
- Constant Field Values
-
FinishStarted
private static final int FinishStarted
- See Also:
- Constant Field Values
-
FinishDone
private static final int FinishDone
- See Also:
- Constant Field Values
-
PRESET_DICT
private static final int PRESET_DICT
- See Also:
- Constant Field Values
-
Z_FILTERED
private static final int Z_FILTERED
- See Also:
- Constant Field Values
-
Z_HUFFMAN_ONLY
private static final int Z_HUFFMAN_ONLY
- See Also:
- Constant Field Values
-
Z_DEFAULT_STRATEGY
private static final int Z_DEFAULT_STRATEGY
- See Also:
- Constant Field Values
-
Z_NO_FLUSH
private static final int Z_NO_FLUSH
- See Also:
- Constant Field Values
-
Z_PARTIAL_FLUSH
private static final int Z_PARTIAL_FLUSH
- See Also:
- Constant Field Values
-
Z_SYNC_FLUSH
private static final int Z_SYNC_FLUSH
- See Also:
- Constant Field Values
-
Z_FULL_FLUSH
private static final int Z_FULL_FLUSH
- See Also:
- Constant Field Values
-
Z_FINISH
private static final int Z_FINISH
- See Also:
- Constant Field Values
-
Z_OK
private static final int Z_OK
- See Also:
- Constant Field Values
-
Z_STREAM_END
private static final int Z_STREAM_END
- See Also:
- Constant Field Values
-
Z_NEED_DICT
private static final int Z_NEED_DICT
- See Also:
- Constant Field Values
-
Z_ERRNO
private static final int Z_ERRNO
- See Also:
- Constant Field Values
-
Z_STREAM_ERROR
private static final int Z_STREAM_ERROR
- See Also:
- Constant Field Values
-
Z_DATA_ERROR
private static final int Z_DATA_ERROR
- See Also:
- Constant Field Values
-
Z_MEM_ERROR
private static final int Z_MEM_ERROR
- See Also:
- Constant Field Values
-
Z_BUF_ERROR
private static final int Z_BUF_ERROR
- See Also:
- Constant Field Values
-
Z_VERSION_ERROR
private static final int Z_VERSION_ERROR
- See Also:
- Constant Field Values
-
INIT_STATE
private static final int INIT_STATE
- See Also:
- Constant Field Values
-
BUSY_STATE
private static final int BUSY_STATE
- See Also:
- Constant Field Values
-
FINISH_STATE
private static final int FINISH_STATE
- See Also:
- Constant Field Values
-
Z_DEFLATED
private static final int Z_DEFLATED
- See Also:
- Constant Field Values
-
STORED_BLOCK
private static final int STORED_BLOCK
- See Also:
- Constant Field Values
-
STATIC_TREES
private static final int STATIC_TREES
- See Also:
- Constant Field Values
-
DYN_TREES
private static final int DYN_TREES
- See Also:
- Constant Field Values
-
Z_BINARY
private static final int Z_BINARY
- See Also:
- Constant Field Values
-
Z_ASCII
private static final int Z_ASCII
- See Also:
- Constant Field Values
-
Z_UNKNOWN
private static final int Z_UNKNOWN
- See Also:
- Constant Field Values
-
Buf_size
private static final int Buf_size
- See Also:
- Constant Field Values
-
REP_3_6
private static final int REP_3_6
- See Also:
- Constant Field Values
-
REPZ_3_10
private static final int REPZ_3_10
- See Also:
- Constant Field Values
-
REPZ_11_138
private static final int REPZ_11_138
- See Also:
- Constant Field Values
-
MIN_MATCH
private static final int MIN_MATCH
- See Also:
- Constant Field Values
-
MAX_MATCH
private static final int MAX_MATCH
- See Also:
- Constant Field Values
-
MIN_LOOKAHEAD
private static final int MIN_LOOKAHEAD
- See Also:
- Constant Field Values
-
MAX_BITS
private static final int MAX_BITS
- See Also:
- Constant Field Values
-
D_CODES
private static final int D_CODES
- See Also:
- Constant Field Values
-
BL_CODES
private static final int BL_CODES
- See Also:
- Constant Field Values
-
LENGTH_CODES
private static final int LENGTH_CODES
- See Also:
- Constant Field Values
-
LITERALS
private static final int LITERALS
- See Also:
- Constant Field Values
-
L_CODES
private static final int L_CODES
- See Also:
- Constant Field Values
-
HEAP_SIZE
private static final int HEAP_SIZE
- See Also:
- Constant Field Values
-
END_BLOCK
private static final int END_BLOCK
- See Also:
- Constant Field Values
-
strm
ZStream strm
-
status
int status
-
pending_buf
byte[] pending_buf
-
pending_buf_size
int pending_buf_size
-
pending_out
int pending_out
-
pending
int pending
-
wrap
int wrap
-
data_type
byte data_type
-
method
byte method
-
last_flush
int last_flush
-
w_size
int w_size
-
w_bits
int w_bits
-
w_mask
int w_mask
-
window
byte[] window
-
window_size
int window_size
-
prev
short[] prev
-
head
short[] head
-
ins_h
int ins_h
-
hash_size
int hash_size
-
hash_bits
int hash_bits
-
hash_mask
int hash_mask
-
hash_shift
int hash_shift
-
block_start
int block_start
-
match_length
int match_length
-
prev_match
int prev_match
-
match_available
int match_available
-
strstart
int strstart
-
match_start
int match_start
-
lookahead
int lookahead
-
prev_length
int prev_length
-
max_chain_length
int max_chain_length
-
max_lazy_match
int max_lazy_match
-
level
int level
-
strategy
int strategy
-
good_match
int good_match
-
nice_match
int nice_match
-
dyn_ltree
short[] dyn_ltree
-
dyn_dtree
short[] dyn_dtree
-
bl_tree
short[] bl_tree
-
l_desc
Tree l_desc
-
d_desc
Tree d_desc
-
bl_desc
Tree bl_desc
-
bl_count
short[] bl_count
-
next_code
short[] next_code
-
heap
int[] heap
-
heap_len
int heap_len
-
heap_max
int heap_max
-
depth
byte[] depth
-
l_buf
byte[] l_buf
-
lit_bufsize
int lit_bufsize
-
last_lit
int last_lit
-
d_buf
int d_buf
-
opt_len
int opt_len
-
static_len
int static_len
-
matches
int matches
-
last_eob_len
int last_eob_len
-
bi_buf
short bi_buf
-
bi_valid
int bi_valid
-
gheader
GZIPHeader gheader
-
-
Constructor Detail
-
Deflate
Deflate(ZStream strm)
-
-
Method Detail
-
lm_init
void lm_init()
-
tr_init
void tr_init()
-
init_block
void init_block()
-
pqdownheap
void pqdownheap(short[] tree, int k)
-
smaller
static boolean smaller(short[] tree, int n, int m, byte[] depth)
-
scan_tree
void scan_tree(short[] tree, int max_code)
-
build_bl_tree
int build_bl_tree()
-
send_all_trees
void send_all_trees(int lcodes, int dcodes, int blcodes)
-
send_tree
void send_tree(short[] tree, int max_code)
-
put_byte
final void put_byte(byte[] p, int start, int len)
-
put_byte
final void put_byte(byte c)
-
put_short
final void put_short(int w)
-
putShortMSB
final void putShortMSB(int b)
-
send_code
final void send_code(int c, short[] tree)
-
send_bits
void send_bits(int value, int length)
-
_tr_align
void _tr_align()
-
_tr_tally
boolean _tr_tally(int dist, int lc)
-
compress_block
void compress_block(short[] ltree, short[] dtree)
-
set_data_type
void set_data_type()
-
bi_flush
void bi_flush()
-
bi_windup
void bi_windup()
-
copy_block
void copy_block(int buf, int len, boolean header)
-
flush_block_only
void flush_block_only(boolean eof)
-
deflate_stored
int deflate_stored(int flush)
-
_tr_stored_block
void _tr_stored_block(int buf, int stored_len, boolean eof)
-
_tr_flush_block
void _tr_flush_block(int buf, int stored_len, boolean eof)
-
fill_window
void fill_window()
-
deflate_fast
int deflate_fast(int flush)
-
deflate_slow
int deflate_slow(int flush)
-
longest_match
int longest_match(int cur_match)
-
deflateInit
int deflateInit(int level, int bits, int memlevel)
-
deflateInit
int deflateInit(int level, int bits)
-
deflateInit
int deflateInit(int level)
-
deflateInit
private int deflateInit(int level, int method, int windowBits, int memLevel, int strategy)
-
deflateReset
int deflateReset()
-
deflateEnd
int deflateEnd()
-
deflateParams
int deflateParams(int _level, int _strategy)
-
deflateSetDictionary
int deflateSetDictionary(byte[] dictionary, int dictLength)
-
deflate
int deflate(int flush)
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
dup
private byte[] dup(byte[] buf)
-
dup
private short[] dup(short[] buf)
-
dup
private int[] dup(int[] buf)
-
getGZIPHeader
GZIPHeader getGZIPHeader()
-
-