- java.lang.Object
-
- swim.codec.Encoder<Encoder<?,O>,O>
-
- swim.deflate.Deflate<O>
-
-
Field Summary
Fields Modifier and Type Field Description int
avail_out
static int
DEF_MEM_LEVEL
protected int
flush
Encoder<?,O>
input
static int
MAX_WBITS
byte[]
next_out
int
next_out_index
static int
OS_CODE
static int
OS_UNKNOWN
long
total_in
long
total_out
static int
Z_BEST_COMPRESSION
static int
Z_BEST_SPEED
static int
Z_BINARY
static int
Z_BLOCK
static int
Z_BUF_ERROR
static int
Z_DATA_ERROR
static int
Z_DEFAULT_COMPRESSION
static int
Z_DEFAULT_STRATEGY
static int
Z_ERRNO
static int
Z_FILTERED
static int
Z_FINISH
static int
Z_FIXED
static int
Z_FULL_FLUSH
static int
Z_HUFFMAN_ONLY
static int
Z_MEM_ERROR
static int
Z_NEED_DICT
static int
Z_NO_COMPRESSION
static int
Z_NO_FLUSH
static int
Z_NO_WRAP
static int
Z_OK
static int
Z_PARTIAL_FLUSH
static int
Z_RLE
static int
Z_STREAM_END
static int
Z_STREAM_ERROR
static int
Z_SYNC_FLUSH
static int
Z_TEXT
static int
Z_TREES
static int
Z_UNKNOWN
static int
Z_VERSION_ERROR
static int
Z_WRAP_GZIP
static int
Z_WRAP_ZLIB
-
Constructor Summary
Constructors Constructor Description Deflate()
Deflate(int wrap)
Deflate(int wrap, int level)
Deflate(int wrap, int level, int windowBits)
Deflate(int wrap, int level, int windowBits, int memlevel)
Deflate(int wrap, int level, int windowBits, int memLevel, int strategy)
Deflate(Encoder<?,O> input)
Deflate(Encoder<?,O> input, int wrap)
Deflate(Encoder<?,O> input, int wrap, int level)
Deflate(Encoder<?,O> input, int wrap, int level, int windowBits)
Deflate(Encoder<?,O> input, int wrap, int level, int windowBits, int memlevel)
Deflate(Encoder<?,O> input, int wrap, int level, int windowBits, int memLevel, int strategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Deflate<O>
clone()
boolean
deflate(int flush)
protected int
deflate_fast(int flush)
protected int
deflate_huff(int flush)
protected int
deflate_rle(int flush)
protected int
deflate_slow(int flush)
protected int
deflate_stored(int flush)
protected void
deflateEnd()
protected void
deflateInit(int wrap, int level, int windowBits, int memLevel, int strategy)
void
deflateParams(int level, int strategy)
void
deflateReset()
void
deflateResetKeep()
Deflate<O>
feed(Encoder<?,O> input)
Returns anEncoder
that represents the continuation of how to encode the giveninput
object.protected void
fill_window()
Deflate<O>
flush(int flush)
protected void
flush_pending()
Encoder<Encoder<?,O>,O>
pull(OutputBuffer<?> output)
Incrementally encodes as muchoutput
buffer data as possible, and returns anotherEncoder
that represents the continuation of how to write additional buffer data.protected int
read_buf(byte[] buf, int start, int size)
-
-
-
Field Detail
-
flush
protected int flush
-
total_in
public long total_in
-
next_out
public byte[] next_out
-
next_out_index
public int next_out_index
-
avail_out
public int avail_out
-
total_out
public long total_out
-
Z_NO_FLUSH
public static final int Z_NO_FLUSH
- See Also:
- Constant Field Values
-
Z_PARTIAL_FLUSH
public static final int Z_PARTIAL_FLUSH
- See Also:
- Constant Field Values
-
Z_SYNC_FLUSH
public static final int Z_SYNC_FLUSH
- See Also:
- Constant Field Values
-
Z_FULL_FLUSH
public static final int Z_FULL_FLUSH
- See Also:
- Constant Field Values
-
Z_FINISH
public static final int Z_FINISH
- See Also:
- Constant Field Values
-
Z_BLOCK
public static final int Z_BLOCK
- See Also:
- Constant Field Values
-
Z_TREES
public static final int Z_TREES
- See Also:
- Constant Field Values
-
Z_OK
public static final int Z_OK
- See Also:
- Constant Field Values
-
Z_STREAM_END
public static final int Z_STREAM_END
- See Also:
- Constant Field Values
-
Z_NEED_DICT
public static final int Z_NEED_DICT
- See Also:
- Constant Field Values
-
Z_ERRNO
public static final int Z_ERRNO
- See Also:
- Constant Field Values
-
Z_STREAM_ERROR
public static final int Z_STREAM_ERROR
- See Also:
- Constant Field Values
-
Z_DATA_ERROR
public static final int Z_DATA_ERROR
- See Also:
- Constant Field Values
-
Z_MEM_ERROR
public static final int Z_MEM_ERROR
- See Also:
- Constant Field Values
-
Z_BUF_ERROR
public static final int Z_BUF_ERROR
- See Also:
- Constant Field Values
-
Z_VERSION_ERROR
public static final int Z_VERSION_ERROR
- See Also:
- Constant Field Values
-
Z_NO_WRAP
public static final int Z_NO_WRAP
- See Also:
- Constant Field Values
-
Z_WRAP_ZLIB
public static final int Z_WRAP_ZLIB
- See Also:
- Constant Field Values
-
Z_WRAP_GZIP
public static final int Z_WRAP_GZIP
- See Also:
- Constant Field Values
-
Z_NO_COMPRESSION
public static final int Z_NO_COMPRESSION
- See Also:
- Constant Field Values
-
Z_BEST_SPEED
public static final int Z_BEST_SPEED
- See Also:
- Constant Field Values
-
Z_BEST_COMPRESSION
public static final int Z_BEST_COMPRESSION
- See Also:
- Constant Field Values
-
Z_DEFAULT_COMPRESSION
public static final int Z_DEFAULT_COMPRESSION
- See Also:
- Constant Field Values
-
Z_FILTERED
public static final int Z_FILTERED
- See Also:
- Constant Field Values
-
Z_HUFFMAN_ONLY
public static final int Z_HUFFMAN_ONLY
- See Also:
- Constant Field Values
-
Z_RLE
public static final int Z_RLE
- See Also:
- Constant Field Values
-
Z_FIXED
public static final int Z_FIXED
- See Also:
- Constant Field Values
-
Z_DEFAULT_STRATEGY
public static final int Z_DEFAULT_STRATEGY
- See Also:
- Constant Field Values
-
Z_BINARY
public static final int Z_BINARY
- See Also:
- Constant Field Values
-
Z_TEXT
public static final int Z_TEXT
- See Also:
- Constant Field Values
-
Z_UNKNOWN
public static final int Z_UNKNOWN
- See Also:
- Constant Field Values
-
MAX_WBITS
public static final int MAX_WBITS
- See Also:
- Constant Field Values
-
DEF_MEM_LEVEL
public static final int DEF_MEM_LEVEL
- See Also:
- Constant Field Values
-
OS_UNKNOWN
public static final int OS_UNKNOWN
- See Also:
- Constant Field Values
-
OS_CODE
public static final int OS_CODE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Deflate
public Deflate(Encoder<?,O> input, int wrap, int level, int windowBits, int memLevel, int strategy)
-
Deflate
public Deflate(int wrap, int level, int windowBits, int memLevel, int strategy)
-
Deflate
public Deflate(int wrap, int level, int windowBits, int memlevel)
-
Deflate
public Deflate(int wrap, int level, int windowBits)
-
Deflate
public Deflate(int wrap, int level)
-
Deflate
public Deflate(int wrap)
-
Deflate
public Deflate()
-
-
Method Detail
-
deflateInit
protected void deflateInit(int wrap, int level, int windowBits, int memLevel, int strategy)
-
deflateResetKeep
public void deflateResetKeep()
-
deflateReset
public void deflateReset()
-
deflateParams
public void deflateParams(int level, int strategy)
-
flush_pending
protected void flush_pending()
-
feed
public Deflate<O> feed(Encoder<?,O> input)
Description copied from class:Encoder
Returns anEncoder
that represents the continuation of how to encode the giveninput
object.
-
pull
public Encoder<Encoder<?,O>,O> pull(OutputBuffer<?> output)
Description copied from class:Encoder
Incrementally encodes as muchoutput
buffer data as possible, and returns anotherEncoder
that represents the continuation of how to write additional buffer data. IfisLast
istrue
, thenpull
must return a terminatedEncoder
, i.e. anEncoder
in the done state, or in the error state. The givenoutput
buffer is only guaranteed to be valid for the duration of the method call; references tooutput
must not be stored.
-
deflate
public boolean deflate(int flush)
-
deflateEnd
protected void deflateEnd()
-
read_buf
protected int read_buf(byte[] buf, int start, int size)
-
fill_window
protected void fill_window()
-
deflate_stored
protected int deflate_stored(int flush)
-
deflate_fast
protected int deflate_fast(int flush)
-
deflate_slow
protected int deflate_slow(int flush)
-
deflate_rle
protected int deflate_rle(int flush)
-
deflate_huff
protected int deflate_huff(int flush)
-
-