Classes

class  Config
 

Package Functions

delegate BlockState CompressFunc (FlushType flush)
 
 DeflateManager ()
 
void _InitializeBlocks ()
 
void pqdownheap (short[] tree, int k)
 
void scan_tree (short[] tree, int max_code)
 
int build_bl_tree ()
 
void send_all_trees (int lcodes, int dcodes, int blcodes)
 
void send_tree (short[] tree, int max_code)
 
void send_code (int c, short[] tree)
 
void send_bits (int value, int length)
 
void _tr_align ()
 
bool _tr_tally (int dist, int lc)
 
void send_compressed_block (short[] ltree, short[] dtree)
 
void set_data_type ()
 
void bi_flush ()
 
void bi_windup ()
 
void copy_block (int buf, int len, bool header)
 
void flush_block_only (bool eof)
 
BlockState DeflateNone (FlushType flush)
 
void _tr_stored_block (int buf, int stored_len, bool eof)
 
void _tr_flush_block (int buf, int stored_len, bool eof)
 
BlockState DeflateFast (FlushType flush)
 
BlockState DeflateSlow (FlushType flush)
 
int longest_match (int cur_match)
 
int Initialize (ZlibCodec codec, CompressionLevel level)
 
int Initialize (ZlibCodec codec, CompressionLevel level, int bits)
 
int Initialize (ZlibCodec codec, CompressionLevel level, int bits, CompressionStrategy compressionStrategy)
 
int Initialize (ZlibCodec codec, CompressionLevel level, int windowBits, int memLevel, CompressionStrategy strategy)
 
void Reset ()
 
int End ()
 
int SetParams (CompressionLevel level, CompressionStrategy strategy)
 
int SetDictionary (byte[] dictionary)
 
int Deflate (FlushType flush)
 

Static Package Functions

static bool _IsSmaller (short[] tree, int n, int m, sbyte[] depth)
 

Package Attributes

ZlibCodec _codec
 
int status
 
byte[] pending
 
int nextPending
 
int pendingCount
 
sbyte data_type
 
int last_flush
 
int w_size
 
int w_bits
 
int w_mask
 
byte[] window
 
int window_size
 
short[] prev
 
short[] head
 
int ins_h
 
int hash_size
 
int hash_bits
 
int hash_mask
 
int hash_shift
 
int block_start
 
int match_length
 
int prev_match
 
int match_available
 
int strstart
 
int match_start
 
int lookahead
 
int prev_length
 
CompressionLevel compressionLevel
 
CompressionStrategy compressionStrategy
 
short[] dyn_ltree
 
short[] dyn_dtree
 
short[] bl_tree
 
Tree treeLiterals = new Tree()
 
Tree treeDistances = new Tree()
 
Tree treeBitLengths = new Tree()
 
short[] bl_count = new short[InternalConstants.MAX_BITS + 1]
 
int[] heap = new int[2 * InternalConstants.L_CODES + 1]
 
int heap_len
 
int heap_max
 
sbyte[] depth = new sbyte[2 * InternalConstants.L_CODES + 1]
 
int _lengthOffset
 
int lit_bufsize
 
int last_lit
 
int _distanceOffset
 
int opt_len
 
int static_len
 
int matches
 
int last_eob_len
 
short bi_buf
 
int bi_valid
 

Properties

bool WantRfc1950HeaderBytes [get, set]
 

Private Member Functions

void _InitializeLazyMatch ()
 
void _InitializeTreeData ()
 
void put_bytes (byte[] p, int start, int len)
 
void _fillWindow ()
 
void SetDeflater ()
 

Private Attributes

CompressFunc DeflateFunction
 
Config config
 
bool Rfc1950BytesEmitted = false
 
bool _WantRfc1950HeaderBytes = true
 

Static Private Attributes

static readonly int MEM_LEVEL_MAX = 9
 
static readonly int MEM_LEVEL_DEFAULT = 8
 
static readonly System.String[] _ErrorMessage
 
static readonly int PRESET_DICT = 0x20
 
static readonly int INIT_STATE = 42
 
static readonly int BUSY_STATE = 113
 
static readonly int FINISH_STATE = 666
 
static readonly int Z_DEFLATED = 8
 
static readonly int STORED_BLOCK = 0
 
static readonly int STATIC_TREES = 1
 
static readonly int DYN_TREES = 2
 
static readonly int Z_BINARY = 0
 
static readonly int Z_ASCII = 1
 
static readonly int Z_UNKNOWN = 2
 
static readonly int Buf_size = 8 * 2
 
static readonly int MIN_MATCH = 3
 
static readonly int MAX_MATCH = 258
 
static readonly int MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1)
 
static readonly int HEAP_SIZE = (2 * InternalConstants.L_CODES + 1)
 
static readonly int END_BLOCK = 256
 

Constructor & Destructor Documentation

Zlib.DeflateManager.DeflateManager ( )
inlinepackage

Member Function Documentation

void Zlib.DeflateManager._fillWindow ( )
inlineprivate
void Zlib.DeflateManager._InitializeBlocks ( )
inlinepackage
void Zlib.DeflateManager._InitializeLazyMatch ( )
inlineprivate
void Zlib.DeflateManager._InitializeTreeData ( )
inlineprivate
static bool Zlib.DeflateManager._IsSmaller ( short[]  tree,
int  n,
int  m,
sbyte[]  depth 
)
inlinestaticpackage
void Zlib.DeflateManager._tr_align ( )
inlinepackage
void Zlib.DeflateManager._tr_flush_block ( int  buf,
int  stored_len,
bool  eof 
)
inlinepackage
void Zlib.DeflateManager._tr_stored_block ( int  buf,
int  stored_len,
bool  eof 
)
inlinepackage
bool Zlib.DeflateManager._tr_tally ( int  dist,
int  lc 
)
inlinepackage
void Zlib.DeflateManager.bi_flush ( )
inlinepackage
void Zlib.DeflateManager.bi_windup ( )
inlinepackage
int Zlib.DeflateManager.build_bl_tree ( )
inlinepackage
delegate BlockState Zlib.DeflateManager.CompressFunc ( FlushType  flush)
package
void Zlib.DeflateManager.copy_block ( int  buf,
int  len,
bool  header 
)
inlinepackage
int Zlib.DeflateManager.Deflate ( FlushType  flush)
inlinepackage
BlockState Zlib.DeflateManager.DeflateFast ( FlushType  flush)
inlinepackage
BlockState Zlib.DeflateManager.DeflateNone ( FlushType  flush)
inlinepackage
BlockState Zlib.DeflateManager.DeflateSlow ( FlushType  flush)
inlinepackage
int Zlib.DeflateManager.End ( )
inlinepackage
void Zlib.DeflateManager.flush_block_only ( bool  eof)
inlinepackage
int Zlib.DeflateManager.Initialize ( ZlibCodec  codec,
CompressionLevel  level 
)
inlinepackage
int Zlib.DeflateManager.Initialize ( ZlibCodec  codec,
CompressionLevel  level,
int  bits 
)
inlinepackage
int Zlib.DeflateManager.Initialize ( ZlibCodec  codec,
CompressionLevel  level,
int  bits,
CompressionStrategy  compressionStrategy 
)
inlinepackage
int Zlib.DeflateManager.Initialize ( ZlibCodec  codec,
CompressionLevel  level,
int  windowBits,
int  memLevel,
CompressionStrategy  strategy 
)
inlinepackage
int Zlib.DeflateManager.longest_match ( int  cur_match)
inlinepackage
void Zlib.DeflateManager.pqdownheap ( short[]  tree,
int  k 
)
inlinepackage
void Zlib.DeflateManager.put_bytes ( byte[]  p,
int  start,
int  len 
)
inlineprivate
void Zlib.DeflateManager.Reset ( )
inlinepackage
void Zlib.DeflateManager.scan_tree ( short[]  tree,
int  max_code 
)
inlinepackage
void Zlib.DeflateManager.send_all_trees ( int  lcodes,
int  dcodes,
int  blcodes 
)
inlinepackage
void Zlib.DeflateManager.send_bits ( int  value,
int  length 
)
inlinepackage
void Zlib.DeflateManager.send_code ( int  c,
short[]  tree 
)
inlinepackage
void Zlib.DeflateManager.send_compressed_block ( short[]  ltree,
short[]  dtree 
)
inlinepackage
void Zlib.DeflateManager.send_tree ( short[]  tree,
int  max_code 
)
inlinepackage
void Zlib.DeflateManager.set_data_type ( )
inlinepackage
void Zlib.DeflateManager.SetDeflater ( )
inlineprivate
int Zlib.DeflateManager.SetDictionary ( byte[]  dictionary)
inlinepackage
int Zlib.DeflateManager.SetParams ( CompressionLevel  level,
CompressionStrategy  strategy 
)
inlinepackage

Member Data Documentation

ZlibCodec Zlib.DeflateManager._codec
package
int Zlib.DeflateManager._distanceOffset
package
readonly System.String [] Zlib.DeflateManager._ErrorMessage
staticprivate
Initial value:
= new System.String[]
{
"need dictionary",
"stream end",
"",
"file error",
"stream error",
"data error",
"insufficient memory",
"buffer error",
"incompatible version",
""
}
int Zlib.DeflateManager._lengthOffset
package
bool Zlib.DeflateManager._WantRfc1950HeaderBytes = true
private
short Zlib.DeflateManager.bi_buf
package
int Zlib.DeflateManager.bi_valid
package
short [] Zlib.DeflateManager.bl_count = new short[InternalConstants.MAX_BITS + 1]
package
short [] Zlib.DeflateManager.bl_tree
package
int Zlib.DeflateManager.block_start
package
readonly int Zlib.DeflateManager.Buf_size = 8 * 2
staticprivate
readonly int Zlib.DeflateManager.BUSY_STATE = 113
staticprivate
CompressionLevel Zlib.DeflateManager.compressionLevel
package
CompressionStrategy Zlib.DeflateManager.compressionStrategy
package
Config Zlib.DeflateManager.config
private
sbyte Zlib.DeflateManager.data_type
package
CompressFunc Zlib.DeflateManager.DeflateFunction
private
sbyte [] Zlib.DeflateManager.depth = new sbyte[2 * InternalConstants.L_CODES + 1]
package
short [] Zlib.DeflateManager.dyn_dtree
package
short [] Zlib.DeflateManager.dyn_ltree
package
readonly int Zlib.DeflateManager.DYN_TREES = 2
staticprivate
readonly int Zlib.DeflateManager.END_BLOCK = 256
staticprivate
readonly int Zlib.DeflateManager.FINISH_STATE = 666
staticprivate
int Zlib.DeflateManager.hash_bits
package
int Zlib.DeflateManager.hash_mask
package
int Zlib.DeflateManager.hash_shift
package
int Zlib.DeflateManager.hash_size
package
short [] Zlib.DeflateManager.head
package
int [] Zlib.DeflateManager.heap = new int[2 * InternalConstants.L_CODES + 1]
package
int Zlib.DeflateManager.heap_len
package
int Zlib.DeflateManager.heap_max
package
readonly int Zlib.DeflateManager.HEAP_SIZE = (2 * InternalConstants.L_CODES + 1)
staticprivate
readonly int Zlib.DeflateManager.INIT_STATE = 42
staticprivate
int Zlib.DeflateManager.ins_h
package
int Zlib.DeflateManager.last_eob_len
package
int Zlib.DeflateManager.last_flush
package
int Zlib.DeflateManager.last_lit
package
int Zlib.DeflateManager.lit_bufsize
package
int Zlib.DeflateManager.lookahead
package
int Zlib.DeflateManager.match_available
package
int Zlib.DeflateManager.match_length
package
int Zlib.DeflateManager.match_start
package
int Zlib.DeflateManager.matches
package
readonly int Zlib.DeflateManager.MAX_MATCH = 258
staticprivate
readonly int Zlib.DeflateManager.MEM_LEVEL_DEFAULT = 8
staticprivate
readonly int Zlib.DeflateManager.MEM_LEVEL_MAX = 9
staticprivate
readonly int Zlib.DeflateManager.MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1)
staticprivate
readonly int Zlib.DeflateManager.MIN_MATCH = 3
staticprivate
int Zlib.DeflateManager.nextPending
package
int Zlib.DeflateManager.opt_len
package
byte [] Zlib.DeflateManager.pending
package
int Zlib.DeflateManager.pendingCount
package
readonly int Zlib.DeflateManager.PRESET_DICT = 0x20
staticprivate
short [] Zlib.DeflateManager.prev
package
int Zlib.DeflateManager.prev_length
package
int Zlib.DeflateManager.prev_match
package
bool Zlib.DeflateManager.Rfc1950BytesEmitted = false
private
int Zlib.DeflateManager.static_len
package
readonly int Zlib.DeflateManager.STATIC_TREES = 1
staticprivate
int Zlib.DeflateManager.status
package
readonly int Zlib.DeflateManager.STORED_BLOCK = 0
staticprivate
int Zlib.DeflateManager.strstart
package
Tree Zlib.DeflateManager.treeBitLengths = new Tree()
package
Tree Zlib.DeflateManager.treeDistances = new Tree()
package
Tree Zlib.DeflateManager.treeLiterals = new Tree()
package
int Zlib.DeflateManager.w_bits
package
int Zlib.DeflateManager.w_mask
package
int Zlib.DeflateManager.w_size
package
byte [] Zlib.DeflateManager.window
package
int Zlib.DeflateManager.window_size
package
readonly int Zlib.DeflateManager.Z_ASCII = 1
staticprivate
readonly int Zlib.DeflateManager.Z_BINARY = 0
staticprivate
readonly int Zlib.DeflateManager.Z_DEFLATED = 8
staticprivate
readonly int Zlib.DeflateManager.Z_UNKNOWN = 2
staticprivate

Property Documentation

bool Zlib.DeflateManager.WantRfc1950HeaderBytes
getsetpackage