Geant4.10
|
#include "deflate.h"
Go to the source code of this file.
Data Structures | |
struct | config_s |
struct | static_tree_desc_s |
Macros | |
#define | NIL 0 |
#define | TOO_FAR 4096 |
#define | EQUAL 0 |
#define | RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0)) |
#define | UPDATE_HASH(s, h, c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask) |
#define | INSERT_STRING(s, str, match_head) |
#define | CLEAR_HASH(s) |
#define | check_match(s, start, match, length) |
#define | FLUSH_BLOCK_ONLY(s, last) |
#define | FLUSH_BLOCK(s, last) |
Typedefs | |
typedef block_state compress_func | OF ((deflate_state *s, int flush)) |
typedef struct config_s | config |
Enumerations | |
enum | block_state { need_more, block_done, finish_started, finish_done } |
Variables | |
const char | deflate_copyright [] |
local const config | configuration_table [10] |
#define check_match | ( | s, | |
start, | |||
match, | |||
length | |||
) |
Definition at line 1321 of file deflate.cc.
Referenced by deflate_fast(), deflate_rle(), and deflate_slow().
#define CLEAR_HASH | ( | s | ) |
Definition at line 196 of file deflate.cc.
Referenced by deflate(), deflateSetDictionary(), and lm_init().
#define EQUAL 0 |
Definition at line 151 of file deflate.cc.
#define FLUSH_BLOCK | ( | s, | |
last | |||
) |
Definition at line 1493 of file deflate.cc.
Referenced by deflate_fast(), deflate_huff(), deflate_rle(), deflate_slow(), and deflate_stored().
#define FLUSH_BLOCK_ONLY | ( | s, | |
last | |||
) |
Definition at line 1481 of file deflate.cc.
Referenced by deflate_slow().
#define INSERT_STRING | ( | s, | |
str, | |||
match_head | |||
) |
#define NIL 0 |
Definition at line 104 of file deflate.cc.
Referenced by deflate_fast(), deflate_slow(), fill_window(), and longest_match().
#define RANK | ( | f | ) | (((f) << 1) - ((f) > 4 ? 9 : 0)) |
Definition at line 159 of file deflate.cc.
Referenced by deflate().
#define TOO_FAR 4096 |
Definition at line 108 of file deflate.cc.
Referenced by deflate_slow().
Definition at line 167 of file deflate.cc.
Referenced by deflate_fast(), deflateSetDictionary(), and fill_window().
typedef block_state compress_func OF((deflate_state *s, int flush)) |
Definition at line 73 of file deflate.cc.
enum block_state |
Enumerator | |
---|---|
need_more | |
block_done | |
finish_started | |
finish_done |
Definition at line 66 of file deflate.cc.
Definition at line 625 of file deflate.cc.
References _tr_align(), _tr_stored_block(), adler32(), Assert, block_done, internal_state::block_start, BUSY_STATE, CLEAR_HASH, COMMENT_STATE, crc32(), deflate_huff(), deflate_rle(), ERR_RETURN, EXTRA_STATE, finish_done, finish_started, FINISH_STATE, flush_pending(), internal_state::gzhead, internal_state::gzindex, HCRC_STATE, INIT_STATE, internal_state::insert, internal_state::last_flush, internal_state::level, internal_state::lookahead, NAME_STATE, need_more, OS_CODE, internal_state::pending, internal_state::pending_buf, internal_state::pending_buf_size, PRESET_DICT, put_byte, putShortMSB(), RANK, internal_state::status, internal_state::strategy, internal_state::strm, internal_state::strstart, internal_state::w_bits, internal_state::wrap, Z_BLOCK, Z_BUF_ERROR, Z_DEFLATED, Z_FINISH, Z_FULL_FLUSH, Z_HUFFMAN_ONLY, Z_NO_FLUSH, Z_NULL, Z_OK, Z_PARTIAL_FLUSH, Z_RLE, Z_STREAM_END, and Z_STREAM_ERROR.
Referenced by compress2(), deflateParams(), cheprep::DeflateOutputStreamBuffer::finish(), gz_comp(), and cheprep::DeflateOutputStreamBuffer::overflow().
local block_state deflate_fast | ( | deflate_state * | s, |
int | flush | ||
) |
Definition at line 1569 of file deflate.cc.
References _tr_tally_dist, _tr_tally_lit, block_done, check_match, fill_window(), finish_done, FLUSH_BLOCK, internal_state::ins_h, internal_state::insert, INSERT_STRING, internal_state::last_lit, longest_match(), internal_state::lookahead, internal_state::match_length, internal_state::match_start, MAX_DIST, MIN_LOOKAHEAD, MIN_MATCH, need_more, NIL, internal_state::strstart, times, Tracevv, UPDATE_HASH, internal_state::window, Z_FINISH, and Z_NO_FLUSH.
local block_state deflate_huff | ( | deflate_state * | s, |
int | flush | ||
) |
Definition at line 1869 of file deflate.cc.
References _tr_tally_lit, block_done, fill_window(), finish_done, FLUSH_BLOCK, internal_state::insert, internal_state::last_lit, internal_state::lookahead, internal_state::match_length, need_more, internal_state::strstart, Tracevv, internal_state::window, Z_FINISH, and Z_NO_FLUSH.
Referenced by deflate().
local block_state deflate_rle | ( | deflate_state * | s, |
int | flush | ||
) |
Definition at line 1798 of file deflate.cc.
References _tr_tally_dist, _tr_tally_lit, Assert, block_done, check_match, fill_window(), finish_done, FLUSH_BLOCK, internal_state::insert, int(), internal_state::last_lit, internal_state::lookahead, internal_state::match_length, MAX_MATCH, MIN_MATCH, need_more, internal_state::prev, internal_state::strstart, Tracevv, internal_state::window, internal_state::window_size, Z_FINISH, and Z_NO_FLUSH.
Referenced by deflate().
local block_state deflate_slow | ( | deflate_state * | s, |
int | flush | ||
) |
Definition at line 1669 of file deflate.cc.
References _tr_tally_dist, _tr_tally_lit, Assert, block_done, check_match, fill_window(), finish_done, FLUSH_BLOCK, FLUSH_BLOCK_ONLY, internal_state::insert, INSERT_STRING, internal_state::last_lit, longest_match(), internal_state::lookahead, internal_state::match_available, internal_state::match_length, internal_state::match_start, MAX_DIST, internal_state::max_lazy_match, MIN_LOOKAHEAD, MIN_MATCH, need_more, NIL, internal_state::prev_length, internal_state::prev_match, internal_state::strategy, internal_state::strm, internal_state::strstart, TOO_FAR, Tracevv, internal_state::window, Z_FILTERED, Z_FINISH, and Z_NO_FLUSH.
local block_state deflate_stored | ( | deflate_state * | s, |
int | flush | ||
) |
Definition at line 1507 of file deflate.cc.
References Assert, block_done, internal_state::block_start, fill_window(), finish_done, FLUSH_BLOCK, internal_state::insert, internal_state::lookahead, MAX_DIST, need_more, internal_state::pending_buf_size, internal_state::strstart, internal_state::w_size, Z_FINISH, and Z_NO_FLUSH.
uLong ZEXPORT deflateBound | ( | z_streamp | strm, |
uLong | sourceLen | ||
) |
Definition at line 531 of file deflate.cc.
References internal_state::gzhead, internal_state::hash_bits, internal_state::strstart, internal_state::w_bits, internal_state::wrap, and Z_NULL.
Definition at line 971 of file deflate.cc.
References deflateEnd(), Z_MEM_ERROR, Z_NULL, Z_OK, Z_STREAM_ERROR, ZALLOC, and zmemcpy().
Definition at line 937 of file deflate.cc.
References BUSY_STATE, COMMENT_STATE, EXTRA_STATE, FINISH_STATE, HCRC_STATE, INIT_STATE, NAME_STATE, status, TRY_FREE, Z_DATA_ERROR, Z_NULL, Z_OK, Z_STREAM_ERROR, and ZFREE.
Referenced by compress2(), deflateCopy(), deflateInit2_(), cheprep::DeflateOutputStreamBuffer::finish(), and gzclose_w().
int ZEXPORT deflateInit2_ | ( | z_streamp | strm, |
int | level, | ||
int | method, | ||
int | windowBits, | ||
int | memLevel, | ||
int | strategy, | ||
const char * | version, | ||
int | stream_size | ||
) |
Definition at line 209 of file deflate.cc.
References internal_state::d_buf, deflateEnd(), deflateReset(), ERR_MSG, FINISH_STATE, internal_state::gzhead, internal_state::hash_bits, internal_state::hash_mask, internal_state::hash_shift, internal_state::hash_size, internal_state::head, internal_state::high_water, internal_state::l_buf, internal_state::level, internal_state::lit_bufsize, internal_state::method, MIN_MATCH, internal_state::pending_buf, internal_state::pending_buf_size, internal_state::prev, internal_state::status, internal_state::strategy, internal_state::strm, internal_state::w_bits, internal_state::w_mask, internal_state::w_size, internal_state::window, internal_state::wrap, G4INCL::String::wrap(), Z_DEFAULT_COMPRESSION, Z_DEFLATED, Z_FIXED, Z_MEM_ERROR, Z_NULL, Z_STREAM_ERROR, Z_VERSION_ERROR, ZALLOC, zcalloc(), zcfree(), and ZLIB_VERSION.
Referenced by deflateInit_().
Definition at line 201 of file deflate.cc.
References DEF_MEM_LEVEL, deflateInit2_(), Z_DEFAULT_STRATEGY, and Z_DEFLATED.
Definition at line 465 of file deflate.cc.
References deflate(), internal_state::good_match, internal_state::level, internal_state::max_chain_length, internal_state::max_lazy_match, internal_state::nice_match, internal_state::strategy, Z_BLOCK, Z_DEFAULT_COMPRESSION, Z_FIXED, Z_NULL, Z_OK, and Z_STREAM_ERROR.
Referenced by gzsetparams().
Definition at line 442 of file deflate.cc.
References _tr_flush_bits(), internal_state::bi_buf, internal_state::bi_valid, Buf_size, internal_state::d_buf, internal_state::pending_out, Z_BUF_ERROR, Z_NULL, Z_OK, and Z_STREAM_ERROR.
Definition at line 411 of file deflate.cc.
References deflateResetKeep(), lm_init(), and Z_OK.
Referenced by deflateInit2_(), and gz_comp().
Definition at line 377 of file deflate.cc.
References _tr_init(), adler32(), BUSY_STATE, crc32(), INIT_STATE, internal_state::last_flush, internal_state::pending, internal_state::pending_buf, internal_state::pending_out, internal_state::status, internal_state::wrap, Z_NO_FLUSH, Z_NULL, Z_OK, Z_STREAM_ERROR, and Z_UNKNOWN.
Referenced by deflateReset().
Definition at line 311 of file deflate.cc.
References adler32(), internal_state::block_start, CLEAR_HASH, fill_window(), internal_state::head, INIT_STATE, internal_state::ins_h, internal_state::insert, internal_state::lookahead, internal_state::match_available, internal_state::match_length, MIN_MATCH, n, internal_state::prev, internal_state::prev_length, internal_state::status, internal_state::strstart, UPDATE_HASH, internal_state::w_mask, internal_state::w_size, internal_state::window, internal_state::wrap, G4INCL::String::wrap(), Z_NULL, Z_OK, and Z_STREAM_ERROR.
int ZEXPORT deflateSetHeader | ( | z_streamp | strm, |
gz_headerp | head | ||
) |
Definition at line 422 of file deflate.cc.
References internal_state::head, Z_NULL, Z_OK, and Z_STREAM_ERROR.
int ZEXPORT deflateTune | ( | z_streamp | strm, |
int | good_length, | ||
int | max_lazy, | ||
int | nice_length, | ||
int | max_chain | ||
) |
Definition at line 501 of file deflate.cc.
References internal_state::good_match, internal_state::max_chain_length, internal_state::max_lazy_match, internal_state::nice_match, Z_NULL, Z_OK, and Z_STREAM_ERROR.
local void fill_window | ( | deflate_state * | s | ) |
Definition at line 1334 of file deflate.cc.
References Assert, internal_state::block_start, curr(), internal_state::hash_size, internal_state::head, internal_state::high_water, internal_state::ins_h, internal_state::insert, internal_state::lookahead, python.hepunit::m, internal_state::match_start, MAX_DIST, MIN_LOOKAHEAD, MIN_MATCH, n, NIL, internal_state::prev, read_buf(), internal_state::strm, internal_state::strstart, times, UPDATE_HASH, internal_state::w_mask, internal_state::w_size, WIN_INIT, internal_state::window, internal_state::window_size, zmemcpy(), and zmemzero().
Referenced by deflate_fast(), deflate_huff(), deflate_rle(), deflate_slow(), deflate_stored(), and deflateSetDictionary().
Definition at line 603 of file deflate.cc.
References _tr_flush_bits(), internal_state::pending, internal_state::pending_buf, internal_state::pending_out, and zmemcpy().
Referenced by deflate().
local void lm_init | ( | deflate_state * | s | ) |
Definition at line 1058 of file deflate.cc.
References internal_state::block_start, CLEAR_HASH, internal_state::good_match, internal_state::ins_h, internal_state::insert, internal_state::level, internal_state::lookahead, internal_state::match_available, internal_state::match_length, internal_state::max_chain_length, internal_state::max_lazy_match, MIN_MATCH, internal_state::nice_match, internal_state::prev_length, internal_state::strstart, internal_state::w_size, and internal_state::window_size.
Referenced by deflateReset().
local uInt longest_match | ( | deflate_state * | s, |
IPos | cur_match | ||
) |
Definition at line 1099 of file deflate.cc.
References Assert, internal_state::good_match, internal_state::hash_bits, int(), internal_state::lookahead, internal_state::match_start, internal_state::max_chain_length, MAX_DIST, MAX_MATCH, MIN_LOOKAHEAD, internal_state::nice_match, NIL, internal_state::prev, internal_state::prev_length, internal_state::strstart, internal_state::w_mask, internal_state::window, and internal_state::window_size.
Referenced by deflate_fast(), and deflate_slow().
local void fill_window OF | ( | (deflate_state *s) | ) |
local block_state deflate_stored OF | ( | (deflate_state *s, int flush) | ) |
local void putShortMSB OF | ( | (deflate_state *s, uInt b) | ) |
local void flush_pending OF | ( | (z_streamp strm) | ) |
local uInt longest_match OF | ( | (deflate_state *s, IPos cur_match) | ) |
local void putShortMSB | ( | deflate_state * | s, |
uInt | b | ||
) |
Definition at line 1031 of file deflate.cc.
References adler32(), crc32(), and zmemcpy().
Referenced by fill_window().
Definition at line 131 of file deflate.cc.
const char deflate_copyright[] |
Definition at line 54 of file deflate.cc.