zenilib
0.5.3.0
|
#include "deflate.h"
Go to the source code of this file.
Macros | |
#define | check_match(s, start, match, length) |
#define | CLEAR_HASH(s) |
#define | EQUAL 0 |
#define | FLUSH_BLOCK(s, last) |
#define | FLUSH_BLOCK_ONLY(s, last) |
#define | INSERT_STRING(s, str, match_head) |
#define | NIL 0 |
#define | TOO_FAR 4096 |
#define | UPDATE_HASH(s, h, c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask) |
Typedefs | |
typedef struct config_s | config |
typedef block_state compress_func | OF ((deflate_state *s, int flush)) |
Enumerations | |
enum | block_state { need_more, block_done, finish_started, finish_done } |
Variables | |
local const config | configuration_table [10] |
const char | deflate_copyright [] |
Definition at line 1292 of file deflate.c.
Referenced by deflate_fast(), deflate_rle(), and deflate_slow().
#define FLUSH_BLOCK | ( | s, | |
last | |||
) |
Definition at line 1448 of file deflate.c.
Referenced by deflate_fast(), deflate_huff(), deflate_rle(), deflate_slow(), and deflate_stored().
#define FLUSH_BLOCK_ONLY | ( | s, | |
last | |||
) |
Definition at line 1436 of file deflate.c.
Referenced by deflate_slow().
Definition at line 183 of file deflate.c.
Referenced by deflate_fast(), deflate_slow(), and deflateSetDictionary().
#define NIL 0 |
Definition at line 104 of file deflate.c.
Referenced by deflate_fast(), deflate_slow(), fill_window(), and longest_match().
#define TOO_FAR 4096 |
Definition at line 108 of file deflate.c.
Referenced by deflate_slow().
Definition at line 164 of file deflate.c.
Referenced by deflate_fast(), deflateSetDictionary(), and fill_window().
typedef struct config_s config |
typedef block_state compress_func OF((deflate_state *s, int flush)) |
enum block_state |
Definition at line 582 of file deflate.c.
References _tr_align(), _tr_stored_block(), adler32(), Assert, block_done, BUSY_STATE, CLEAR_HASH, COMMENT_STATE, crc32(), deflate_huff(), deflate_rle(), ERR_RETURN, EXTRA_STATE, finish_done, finish_started, FINISH_STATE, flush, flush_pending(), HCRC_STATE, header(), INIT_STATE, NAME_STATE, need_more, OS_CODE, PRESET_DICT, put_byte, putShortMSB(), 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(), do_flush(), gz_comp(), gzwrite(), png_text_compress(), png_write_filtered_row(), png_write_finish_row(), png_write_flush(), test_deflate(), test_dict_deflate(), test_flush(), and test_large_deflate().
local block_state deflate_fast | ( | deflate_state * | s, |
int | flush | ||
) |
Definition at line 1520 of file deflate.c.
References _tr_tally_dist, _tr_tally_lit, block_done, check_match, fill_window(), finish_done, FLUSH_BLOCK, INSERT_STRING, longest_match(), MAX_DIST, MIN_LOOKAHEAD, MIN_MATCH, need_more, NIL, Tracevv, UPDATE_HASH, Z_FINISH, and Z_NO_FLUSH.
local block_state deflate_huff | ( | deflate_state * | s, |
int | flush | ||
) |
Definition at line 1807 of file deflate.c.
References _tr_tally_lit, block_done, fill_window(), finish_done, FLUSH_BLOCK, need_more, Tracevv, Z_FINISH, and Z_NO_FLUSH.
Referenced by deflate().
local block_state deflate_rle | ( | deflate_state * | s, |
int | flush | ||
) |
Definition at line 1741 of file deflate.c.
References _tr_tally_dist, _tr_tally_lit, block_done, check_match, fill_window(), finish_done, FLUSH_BLOCK, int, MAX_MATCH, MIN_MATCH, need_more, Tracevv, Z_FINISH, and Z_NO_FLUSH.
Referenced by deflate().
local block_state deflate_slow | ( | deflate_state * | s, |
int | flush | ||
) |
Definition at line 1616 of file deflate.c.
References _tr_tally_dist, _tr_tally_lit, Assert, block_done, check_match, fill_window(), finish_done, FLUSH_BLOCK, FLUSH_BLOCK_ONLY, INSERT_STRING, longest_match(), MAX_DIST, MIN_LOOKAHEAD, MIN_MATCH, need_more, NIL, TOO_FAR, Tracevv, Z_FILTERED, Z_FINISH, and Z_NO_FLUSH.
local block_state deflate_stored | ( | deflate_state * | s, |
int | flush | ||
) |
Definition at line 1462 of file deflate.c.
References Assert, block_done, fill_window(), finish_done, FLUSH_BLOCK, MAX_DIST, need_more, Z_FINISH, and Z_NO_FLUSH.
Definition at line 930 of file deflate.c.
References deflateEnd(), Z_MEM_ERROR, Z_NULL, Z_OK, Z_STREAM_ERROR, ZALLOC, and zmemcpy().
Definition at line 895 of file deflate.c.
References BUSY_STATE, COMMENT_STATE, EXTRA_STATE, FINISH_STATE, HCRC_STATE, INIT_STATE, NAME_STATE, TRY_FREE, Z_DATA_ERROR, Z_NULL, Z_OK, Z_STREAM_ERROR, and ZFREE.
Referenced by compress2(), deflateCopy(), deflateInit2_(), destroy(), gzclose_w(), png_write_destroy(), png_zlib_claim(), test_deflate(), test_dict_deflate(), test_flush(), and test_large_deflate().
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 210 of file deflate.c.
References deflateEnd(), deflateReset(), ERR_MSG, FINISH_STATE, if(), MAX_MEM_LEVEL, MIN_MATCH, windowBits, 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 198 of file deflate.c.
References DEF_MEM_LEVEL, deflateInit2_(), MAX_WBITS, Z_DEFAULT_STRATEGY, and Z_DEFLATED.
Definition at line 412 of file deflate.c.
References deflate(), Z_BLOCK, Z_DEFAULT_COMPRESSION, Z_FIXED, Z_NULL, Z_OK, and Z_STREAM_ERROR.
Referenced by gzsetparams(), and test_large_deflate().
Definition at line 353 of file deflate.c.
References _tr_init(), adler32(), BUSY_STATE, crc32(), if(), INIT_STATE, lm_init(), Z_NO_FLUSH, Z_NULL, Z_OK, Z_STREAM_ERROR, and Z_UNKNOWN.
Referenced by deflateInit2_(), gz_comp(), and png_zlib_release().
Definition at line 311 of file deflate.c.
References adler32(), INIT_STATE, INSERT_STRING, MIN_MATCH, UPDATE_HASH, Z_NULL, Z_OK, Z_STREAM_ERROR, and zmemcpy().
Referenced by test_dict_deflate().
int ZEXPORT deflateSetHeader | ( | z_streamp | strm, |
gz_headerp | head | ||
) |
int ZEXPORT deflateTune | ( | z_streamp | strm, |
int | good_length, | ||
int | max_lazy, | ||
int | nice_length, | ||
int | max_chain | ||
) |
Definition at line 451 of file deflate.c.
References Z_NULL, Z_OK, and Z_STREAM_ERROR.
local void fill_window | ( | deflate_state * | s | ) |
Definition at line 1305 of file deflate.c.
References Assert, if(), init(), m, MAX_DIST, MIN_LOOKAHEAD, MIN_MATCH, NIL, read_buf(), UPDATE_HASH, WIN_INIT, zmemcpy(), and zmemzero().
Referenced by deflate_fast(), deflate_huff(), deflate_rle(), deflate_slow(), and deflate_stored().
local void lm_init | ( | deflate_state * | s | ) |
Definition at line 1022 of file deflate.c.
References CLEAR_HASH, and MIN_MATCH.
Referenced by deflateReset().
local uInt longest_match | ( | deflate_state * | s, |
IPos | cur_match | ||
) |
Definition at line 1063 of file deflate.c.
References Assert, int, MAX_DIST, MAX_MATCH, MIN_LOOKAHEAD, and NIL.
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 | ||
) |