|
NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
Go to the source code of this file.
Classes | |
| struct | config |
| struct | ct_data |
| struct | tree_desc |
| class | TTreeState |
| class | TBitState |
| class | TDeflateState |
| struct | iztimes |
| struct | zlist |
| struct | TState |
| class | TZip |
| struct | TZipHandleData |
Macros | |
| #define | EOF (-1) |
| #define | ZE_MISS -1 |
| #define | ZE_OK 0 |
| #define | ZE_EOF 2 |
| #define | ZE_FORM 3 |
| #define | ZE_MEM 4 |
| #define | ZE_LOGIC 5 |
| #define | ZE_BIG 6 |
| #define | ZE_NOTE 7 |
| #define | ZE_TEST 8 |
| #define | ZE_ABORT 9 |
| #define | ZE_TEMP 10 |
| #define | ZE_READ 11 |
| #define | ZE_NONE 12 |
| #define | ZE_NAME 13 |
| #define | ZE_WRITE 14 |
| #define | ZE_CREAT 15 |
| #define | ZE_PARMS 16 |
| #define | ZE_OPEN 18 |
| #define | ZE_MAXERR 18 |
| #define | UNKNOWN (-1) |
| #define | BINARY 0 |
| #define | ASCII 1 |
| #define | BEST -1 |
| #define | STORE 0 |
| #define | DEFLATE 8 |
| #define | CRCVAL_INITIAL 0L |
| #define | MSDOS_HIDDEN_ATTR 0x02 |
| #define | MSDOS_DIR_ATTR 0x10 |
| #define | LOCHEAD 26 |
| #define | CENHEAD 42 |
| #define | ENDHEAD 18 |
| #define | EB_HEADSIZE 4 /* length of a extra field block header */ |
| #define | EB_LEN 2 /* offset of data length field in header */ |
| #define | EB_UT_MINLEN 1 /* minimal UT field contains Flags byte */ |
| #define | EB_UT_FLAGS 0 /* byte offset of Flags field */ |
| #define | EB_UT_TIME1 1 /* byte offset of 1st time value */ |
| #define | EB_UT_FL_MTIME (1 << 0) /* mtime present */ |
| #define | EB_UT_FL_ATIME (1 << 1) /* atime present */ |
| #define | EB_UT_FL_CTIME (1 << 2) /* ctime present */ |
| #define | EB_UT_LEN(n) (EB_UT_MINLEN + 4 * (n)) |
| #define | EB_L_UT_SIZE (EB_HEADSIZE + EB_UT_LEN(3)) |
| #define | EB_C_UT_SIZE (EB_HEADSIZE + EB_UT_LEN(1)) |
| #define | PUTSH(a, f) {char _putsh_c=(char)((a)&0xff); wfunc(param,&_putsh_c,1); _putsh_c=(char)((a)>>8); wfunc(param,&_putsh_c,1);} |
| #define | PUTLG(a, f) {PUTSH((a) & 0xffff,(f)) PUTSH((a) >> 16,(f))} |
| #define | LOCSIG 0x04034b50L |
| #define | CENSIG 0x02014b50L |
| #define | ENDSIG 0x06054b50L |
| #define | EXTLOCSIG 0x08074b50L |
| #define | MIN_MATCH 3 |
| #define | MAX_MATCH 258 |
| #define | WSIZE (0x8000) |
| #define | MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) |
| #define | MAX_DIST (WSIZE-MIN_LOOKAHEAD) |
| #define | ZIP_HANDLE 1 |
| #define | ZIP_FILENAME 2 |
| #define | ZIP_MEMORY 3 |
| #define | ZIP_FOLDER 4 |
| #define | MAX_BITS 15 |
| #define | MAX_BL_BITS 7 |
| #define | LENGTH_CODES 29 |
| #define | LITERALS 256 |
| #define | END_BLOCK 256 |
| #define | L_CODES (LITERALS+1+LENGTH_CODES) |
| #define | D_CODES 30 |
| #define | BL_CODES 19 |
| #define | STORED_BLOCK 0 |
| #define | STATIC_TREES 1 |
| #define | DYN_TREES 2 |
| #define | LIT_BUFSIZE 0x8000 |
| #define | DIST_BUFSIZE LIT_BUFSIZE |
| #define | REP_3_6 16 |
| #define | REPZ_3_10 17 |
| #define | REPZ_11_138 18 |
| #define | HEAP_SIZE (2*L_CODES+1) |
| #define | Buf_size (8 * 2*sizeof(char)) |
| #define | PUTSHORT(state, w) |
| #define | PUTBYTE(state, b) |
| #define | HASH_BITS 15 |
| #define | HASH_SIZE (unsigned)(1<<HASH_BITS) |
| #define | HASH_MASK (HASH_SIZE-1) |
| #define | WMASK (WSIZE-1) |
| #define | NIL 0 |
| #define | FAST 4 |
| #define | SLOW 2 |
| #define | TOO_FAR 4096 |
| #define | EQUAL 0 |
| #define | H_SHIFT ((HASH_BITS+MIN_MATCH-1)/MIN_MATCH) |
| #define | max_insert_length max_lazy_match |
| #define | send_code(state, c, tree) send_bits(state, tree[c].fc.code, tree[c].dl.len) |
| #define | d_code(dist) ((dist) < 256 ? state.ts.dist_code[dist] : state.ts.dist_code[256+((dist)>>7)]) |
| #define | Max(a, b) (a >= b ? a : b) |
| #define | SMALLEST 1 |
| #define | pqremove(tree, top) |
| #define | smaller(tree, n, m) |
| #define | UPDATE_HASH(h, c) (h = (((h)<<H_SHIFT) ^ (c)) & HASH_MASK) |
| #define | INSERT_STRING(s, match_head) |
| #define | check_match(state, start, match, length) |
| #define | FLUSH_BLOCK(state, eof) |
| #define | CRC32(c, b) (crc_table[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8)) |
| #define | DO1(buf) crc = CRC32(crc, *buf++) |
| #define | DO2(buf) DO1(buf); DO1(buf) |
| #define | DO4(buf) DO2(buf); DO2(buf) |
| #define | DO8(buf) DO4(buf); DO4(buf) |
Typedefs | |
| typedef unsigned char | uch |
| typedef unsigned short | ush |
| typedef unsigned long | ulg |
| typedef size_t | extent |
| typedef unsigned | Pos |
| typedef unsigned | IPos |
| typedef struct config | config |
| typedef struct ct_data | ct_data |
| typedef struct tree_desc | tree_desc |
| typedef __int64 | lutime_t |
| typedef struct iztimes | iztimes |
| typedef struct zlist | TZipFileInfo |
| typedef unsigned(* | READFUNC) (TState &state, char *buf, unsigned size) |
| typedef unsigned(* | FLUSHFUNC) (void *param, const char *buf, unsigned *size) |
| typedef unsigned(* | WRITEFUNC) (void *param, const char *buf, unsigned size) |
Functions | |
| void | Assert (TState &state, bool cond, const char *msg) |
| void __cdecl | Trace (const char *x,...) |
| void __cdecl | Tracec (bool, const char *x,...) |
| void | init_block (TState &) |
| void | pqdownheap (TState &, ct_data *tree, int k) |
| void | gen_bitlen (TState &, tree_desc *desc) |
| void | gen_codes (TState &state, ct_data *tree, int max_code) |
| void | build_tree (TState &, tree_desc *desc) |
| void | scan_tree (TState &, ct_data *tree, int max_code) |
| void | send_tree (TState &state, ct_data *tree, int max_code) |
| int | build_bl_tree (TState &) |
| void | send_all_trees (TState &state, int lcodes, int dcodes, int blcodes) |
| void | compress_block (TState &state, ct_data *ltree, ct_data *dtree) |
| void | set_file_type (TState &) |
| void | send_bits (TState &state, int value, int length) |
| unsigned | bi_reverse (unsigned code, int len) |
| void | bi_windup (TState &state) |
| void | copy_block (TState &state, char *buf, unsigned len, int header) |
| void | ct_init (TState &state, ush *attr) |
| ulg | flush_block (TState &state, char *buf, ulg stored_len, int eof) |
| int | ct_tally (TState &state, int dist, int lc) |
| void | bi_init (TState &state, char *tgt_buf, unsigned tgt_size, int flsh_allowed) |
| void | fill_window (TState &state) |
| ulg | deflate_fast (TState &state) |
| int | longest_match (TState &state, IPos cur_match) |
| void | lm_init (TState &state, int pack_level, ush *flags) |
| ulg | deflate (TState &state) |
| int | putlocal (struct zlist far *z, WRITEFUNC wfunc, void *param) |
| int | putextended (struct zlist far *z, WRITEFUNC wfunc, void *param) |
| int | putcentral (struct zlist far *z, WRITEFUNC wfunc, void *param) |
| int | putend (int n, ulg s, ulg c, extent m, char *z, WRITEFUNC wfunc, void *param) |
| ulg | crc32 (ulg crc, const uch *buf, extent len) |
| void | update_keys (unsigned long *keys, char c) |
| char | decrypt_byte (unsigned long *keys) |
| char | zencode (unsigned long *keys, char c) |
| bool | HasZipSuffix (const TCHAR *fn) |
| lutime_t | filetime2timet (const FILETIME ft) |
| void | filetime2dosdatetime (const FILETIME ft, WORD *dosdate, WORD *dostime) |
| ZRESULT | GetFileInfo (HANDLE hf, ulg *attr, long *size, iztimes *times, ulg *timestamp) |
| unsigned int | FormatZipMessageZ (ZRESULT code, char *buf, unsigned int len) |
| HZIP | CreateZipInternal (void *z, unsigned int len, DWORD flags, const char *password) |
| HZIP | CreateZipHandle (HANDLE h, const char *password) |
| HZIP | CreateZip (const TCHAR *fn, const char *password) |
| HZIP | CreateZip (void *z, unsigned int len, const char *password) |
| ZRESULT | ZipAddInternal (HZIP hz, const TCHAR *dstzn, void *src, unsigned int len, DWORD flags) |
| ZRESULT | ZipAdd (HZIP hz, const TCHAR *dstzn, const TCHAR *fn) |
| ZRESULT | ZipAdd (HZIP hz, const TCHAR *dstzn, void *src, unsigned int len) |
| ZRESULT | ZipAddHandle (HZIP hz, const TCHAR *dstzn, HANDLE h) |
| ZRESULT | ZipAddHandle (HZIP hz, const TCHAR *dstzn, HANDLE h, unsigned int len) |
| ZRESULT | ZipAddFolder (HZIP hz, const TCHAR *dstzn) |
| ZRESULT | ZipGetMemory (HZIP hz, void **buf, unsigned long *len) |
| ZRESULT | CloseZipZ (HZIP hz) |
| bool | IsZipHandleZ (HZIP hz) |
Variables | |
| const int | extra_lbits [LENGTH_CODES] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0} |
| const int | extra_dbits [D_CODES] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13} |
| const int | extra_blbits [BL_CODES] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7} |
| const uch | bl_order [BL_CODES] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15} |
| const config | configuration_table [10] |
| const ulg | crc_table [256] |
| bool | has_seeded = false |
| ZRESULT | lasterrorZ = ZR_OK |
| #define CRC32 | ( | c, | |
| b | |||
| ) | (crc_table[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8)) |
| #define d_code | ( | dist | ) | ((dist) < 256 ? state.ts.dist_code[dist] : state.ts.dist_code[256+((dist)>>7)]) |
| #define DIST_BUFSIZE LIT_BUFSIZE |
| #define EB_C_UT_SIZE (EB_HEADSIZE + EB_UT_LEN(1)) |
| #define EB_HEADSIZE 4 /* length of a extra field block header */ |
| #define EB_L_UT_SIZE (EB_HEADSIZE + EB_UT_LEN(3)) |
| #define EB_LEN 2 /* offset of data length field in header */ |
| #define EB_UT_LEN | ( | n | ) | (EB_UT_MINLEN + 4 * (n)) |
| #define EB_UT_MINLEN 1 /* minimal UT field contains Flags byte */ |
| #define FLUSH_BLOCK | ( | state, | |
| eof | |||
| ) |
| #define INSERT_STRING | ( | s, | |
| match_head | |||
| ) |
| #define L_CODES (LITERALS+1+LENGTH_CODES) |
| #define MAX_DIST (WSIZE-MIN_LOOKAHEAD) |
| #define pqremove | ( | tree, | |
| top | |||
| ) |
| #define PUTBYTE | ( | state, | |
| b | |||
| ) |
| #define PUTSH | ( | a, | |
| f | |||
| ) | {char _putsh_c=(char)((a)&0xff); wfunc(param,&_putsh_c,1); _putsh_c=(char)((a)>>8); wfunc(param,&_putsh_c,1);} |
| #define PUTSHORT | ( | state, | |
| w | |||
| ) |
| #define send_code | ( | state, | |
| c, | |||
| tree | |||
| ) | send_bits(state, tree[c].fc.code, tree[c].dl.len) |
| #define smaller | ( | tree, | |
| n, | |||
| m | |||
| ) |
| typedef unsigned(* FLUSHFUNC) (void *param, const char *buf, unsigned *size) |
| typedef unsigned(* READFUNC) (TState &state, char *buf, unsigned size) |
| typedef struct zlist TZipFileInfo |
| typedef unsigned(* WRITEFUNC) (void *param, const char *buf, unsigned size) |
| void Assert | ( | TState & | state, |
| bool | cond, | ||
| const char * | msg | ||
| ) |
Definition at line 625 of file zip.cpp.
References TState::err.
Referenced by compress_block(), copy_block(), ct_init(), ct_tally(), deflate_fast(), fill_window(), flush_block(), gen_codes(), lm_init(), longest_match(), send_all_trees(), send_bits(), and send_tree().
| void bi_init | ( | TState & | state, |
| char * | tgt_buf, | ||
| unsigned | tgt_size, | ||
| int | flsh_allowed | ||
| ) |
Definition at line 1494 of file zip.cpp.
References TBitState::bi_buf, TBitState::bi_valid, TBitState::bits_sent, TState::bs, TBitState::flush_flg, TBitState::out_buf, TBitState::out_offset, and TBitState::out_size.
Referenced by TZip::ideflate().
| unsigned bi_reverse | ( | unsigned | code, |
| int | len | ||
| ) |
Definition at line 1534 of file zip.cpp.
Referenced by ct_init(), and gen_codes().
| void bi_windup | ( | TState & | state | ) |
Definition at line 1549 of file zip.cpp.
References TBitState::bi_buf, TBitState::bi_valid, TBitState::bits_sent, TState::bs, TBitState::flush_flg, TState::flush_outbuf, TBitState::out_buf, TBitState::out_offset, TState::param, PUTBYTE, and PUTSHORT.
Referenced by copy_block(), and flush_block().
| int build_bl_tree | ( | TState & | state | ) |
Definition at line 1200 of file zip.cpp.
References BL_CODES, TTreeState::bl_desc, bl_order, TTreeState::bl_tree, build_tree(), TTreeState::d_desc, ct_data::dl, TTreeState::dyn_dtree, TTreeState::dyn_ltree, TTreeState::l_desc, ct_data::len, tree_desc::max_code, TTreeState::opt_len, scan_tree(), TTreeState::static_len, Trace(), and TState::ts.
Referenced by flush_block().
Definition at line 979 of file zip.cpp.
References ct_data::dad, TTreeState::depth, ct_data::dl, tree_desc::dyn_tree, tree_desc::elems, ct_data::fc, ct_data::freq, gen_bitlen(), gen_codes(), TTreeState::heap, TTreeState::heap_len, TTreeState::heap_max, HEAP_SIZE, ct_data::len, Max, tree_desc::max_code, TTreeState::opt_len, pqdownheap(), pqremove, SMALLEST, TTreeState::static_len, tree_desc::static_tree, and TState::ts.
Referenced by build_bl_tree(), and flush_block().
| ZRESULT CloseZipZ | ( | HZIP | hz | ) |
Definition at line 3323 of file zip.cpp.
References TZip::Close(), TZipHandleData::flag, lasterrorZ, TZipHandleData::zip, ZR_ARGS, and ZR_ZMODE.
Definition at line 1423 of file zip.cpp.
References Assert(), TTreeState::base_dist, TTreeState::base_length, TTreeState::d_buf, d_code, D_CODES, END_BLOCK, extra_dbits, extra_lbits, TTreeState::flag_buf, TTreeState::l_buf, TTreeState::last_lit, TTreeState::length_code, LITERALS, send_bits(), send_code, and TState::ts.
Referenced by flush_block().
| void copy_block | ( | TState & | state, |
| char * | buf, | ||
| unsigned | len, | ||
| int | header | ||
| ) |
Definition at line 1572 of file zip.cpp.
References Assert(), bi_windup(), TBitState::bits_sent, TState::bs, TBitState::flush_flg, TState::flush_outbuf, TBitState::out_buf, TBitState::out_offset, TBitState::out_size, TState::param, and PUTSHORT.
Referenced by flush_block().
| HZIP CreateZip | ( | const TCHAR * | fn, |
| const char * | password | ||
| ) |
Definition at line 3253 of file zip.cpp.
References CreateZipInternal(), and ZIP_FILENAME.
Referenced by Zipfile::open().
| HZIP CreateZip | ( | void * | z, |
| unsigned int | len, | ||
| const char * | password | ||
| ) |
Definition at line 3257 of file zip.cpp.
References CreateZipInternal(), and ZIP_MEMORY.
| HZIP CreateZipHandle | ( | HANDLE | h, |
| const char * | password | ||
| ) |
Definition at line 3249 of file zip.cpp.
References CreateZipInternal(), and ZIP_HANDLE.
| HZIP CreateZipInternal | ( | void * | z, |
| unsigned int | len, | ||
| DWORD | flags, | ||
| const char * | password | ||
| ) |
Definition at line 3235 of file zip.cpp.
References TZip::Create(), TZipHandleData::flag, lasterrorZ, TZipHandleData::zip, and ZR_OK.
Referenced by CreateZip(), and CreateZipHandle().
Definition at line 688 of file zip.cpp.
References Assert(), TTreeState::base_dist, TTreeState::base_length, bi_reverse(), bits, TTreeState::bl_count, TTreeState::cmpr_bytelen, TTreeState::cmpr_len_bits, ct_data::code, D_CODES, TTreeState::dist_code, ct_data::dl, extra_dbits, extra_lbits, ct_data::fc, TTreeState::file_type, gen_codes(), init_block(), TTreeState::input_len, L_CODES, ct_data::len, TTreeState::length_code, LENGTH_CODES, MAX_BITS, TTreeState::static_dtree, TTreeState::static_ltree, and TState::ts.
Referenced by TZip::ideflate().
| int ct_tally | ( | TState & | state, |
| int | dist, | ||
| int | lc | ||
| ) |
Definition at line 1366 of file zip.cpp.
References Assert(), TDeflateState::block_start, TTreeState::d_buf, d_code, D_CODES, DIST_BUFSIZE, TState::ds, TTreeState::dyn_dtree, TTreeState::dyn_ltree, extra_dbits, ct_data::fc, TTreeState::flag_bit, TTreeState::flag_buf, TTreeState::flags, ct_data::freq, TTreeState::l_buf, TTreeState::last_dist, TTreeState::last_flags, TTreeState::last_lit, TTreeState::length_code, TState::level, LIT_BUFSIZE, LITERALS, MAX_DIST, MAX_MATCH, MIN_MATCH, TDeflateState::strstart, Trace(), and TState::ts.
Referenced by deflate(), and deflate_fast().
| char decrypt_byte | ( | unsigned long * | keys | ) |
Definition at line 2019 of file zip.cpp.
References TDeflateState::block_start, check_match, ct_tally(), deflate_fast(), TState::ds, fill_window(), FLUSH_BLOCK, INSERT_STRING, TState::level, longest_match(), TDeflateState::lookahead, TDeflateState::match_start, MAX_DIST, TDeflateState::max_lazy_match, MIN_LOOKAHEAD, MIN_MATCH, TDeflateState::nice_match, NIL, TDeflateState::prev_length, TDeflateState::strstart, TOO_FAR, and TDeflateState::window.
Referenced by TZip::ideflate().
Definition at line 1928 of file zip.cpp.
References Assert(), TDeflateState::block_start, check_match, ct_tally(), TState::ds, fill_window(), FLUSH_BLOCK, TDeflateState::ins_h, INSERT_STRING, longest_match(), TDeflateState::lookahead, TDeflateState::match_start, MAX_DIST, MIN_LOOKAHEAD, MIN_MATCH, TDeflateState::nice_match, NIL, TDeflateState::prev_length, TDeflateState::strstart, UPDATE_HASH, and TDeflateState::window.
Referenced by deflate().
| void filetime2dosdatetime | ( | const FILETIME | ft, |
| WORD * | dosdate, | ||
| WORD * | dostime | ||
| ) |
Definition at line 2355 of file zip.cpp.
Referenced by GetFileInfo(), TZip::open_dir(), TZip::open_handle(), and TZip::open_mem().
| lutime_t filetime2timet | ( | const FILETIME | ft | ) |
Definition at line 2349 of file zip.cpp.
Referenced by GetFileInfo(), TZip::open_dir(), TZip::open_handle(), and TZip::open_mem().
| void fill_window | ( | TState & | state | ) |
Definition at line 1834 of file zip.cpp.
References Assert(), TDeflateState::block_start, TState::ds, EOF, TDeflateState::eofile, HASH_SIZE, TDeflateState::head, TDeflateState::lookahead, TDeflateState::match_start, MAX_DIST, MIN_LOOKAHEAD, NIL, TDeflateState::prev, TState::readfunc, TDeflateState::sliding, TDeflateState::strstart, TDeflateState::window, TDeflateState::window_size, and WSIZE.
Referenced by deflate(), deflate_fast(), and lm_init().
Definition at line 1265 of file zip.cpp.
References Assert(), bi_windup(), TBitState::bits_sent, TState::bs, build_bl_tree(), build_tree(), TTreeState::cmpr_bytelen, TTreeState::cmpr_len_bits, compress_block(), copy_block(), TTreeState::d_desc, TTreeState::dyn_dtree, TTreeState::dyn_ltree, DYN_TREES, TTreeState::file_type, TTreeState::flag_buf, TTreeState::flags, init_block(), TTreeState::input_len, TTreeState::l_desc, TTreeState::last_dist, TTreeState::last_flags, TTreeState::last_lit, tree_desc::max_code, TTreeState::opt_len, send_all_trees(), send_bits(), set_file_type(), TTreeState::static_dtree, TTreeState::static_len, TTreeState::static_ltree, STATIC_TREES, STORED_BLOCK, Trace(), TState::ts, and UNKNOWN.
| unsigned int FormatZipMessageZ | ( | ZRESULT | code, |
| char * | buf, | ||
| unsigned int | len | ||
| ) |
Definition at line 3147 of file zip.cpp.
References lasterrorZ, ZR_ARGS, ZR_CORRUPT, ZR_ENDED, ZR_FAILED, ZR_FLATE, ZR_MEMSIZE, ZR_MISSIZE, ZR_MORE, ZR_NOALLOC, ZR_NOCHANGE, ZR_NODUPH, ZR_NOFILE, ZR_NOTFOUND, ZR_NOTINITED, ZR_NOTMMAP, ZR_OK, ZR_PARTIALUNZ, ZR_READ, ZR_RECENT, ZR_SEEK, ZR_WRITE, and ZR_ZMODE.
Definition at line 849 of file zip.cpp.
References bits, TTreeState::bl_count, ct_data::dad, ct_data::dl, tree_desc::dyn_tree, tree_desc::extra_base, tree_desc::extra_bits, ct_data::fc, for(), ct_data::freq, TTreeState::heap, TTreeState::heap_max, HEAP_SIZE, ct_data::len, MAX_BITS, tree_desc::max_code, tree_desc::max_length, TTreeState::opt_len, TTreeState::static_len, tree_desc::static_tree, Trace(), and TState::ts.
Referenced by build_tree().
Definition at line 939 of file zip.cpp.
References Assert(), bi_reverse(), bits, TTreeState::bl_count, ct_data::code, ct_data::dl, ct_data::fc, ct_data::len, MAX_BITS, Trace(), and TState::ts.
Referenced by build_tree(), and ct_init().
Definition at line 2370 of file zip.cpp.
References iztimes::atime, iztimes::ctime, filetime2dosdatetime(), filetime2timet(), iztimes::mtime, ZR_NOFILE, and ZR_OK.
Referenced by TZip::open_handle().
| bool HasZipSuffix | ( | const TCHAR * | fn | ) |
| void init_block | ( | TState & | state | ) |
Definition at line 769 of file zip.cpp.
References BL_CODES, TTreeState::bl_tree, D_CODES, TTreeState::dyn_dtree, TTreeState::dyn_ltree, END_BLOCK, ct_data::fc, TTreeState::flag_bit, TTreeState::flags, for(), ct_data::freq, L_CODES, TTreeState::last_dist, TTreeState::last_flags, TTreeState::last_lit, TTreeState::opt_len, TTreeState::static_len, and TState::ts.
Referenced by ct_init(), and flush_block().
| bool IsZipHandleZ | ( | HZIP | hz | ) |
Definition at line 3343 of file zip.cpp.
References TZipHandleData::flag.
Definition at line 1647 of file zip.cpp.
References Assert(), TDeflateState::block_start, configuration_table, TState::ds, EOF, TDeflateState::eofile, FAST, fill_window(), config::good_length, TDeflateState::good_match, HASH_SIZE, TDeflateState::head, TDeflateState::ins_h, TDeflateState::lookahead, config::max_chain, TDeflateState::max_chain_length, config::max_lazy, TDeflateState::max_lazy_match, MIN_LOOKAHEAD, MIN_MATCH, config::nice_length, TDeflateState::nice_match, NIL, TState::readfunc, TDeflateState::sliding, SLOW, TDeflateState::strstart, UPDATE_HASH, TDeflateState::window, TDeflateState::window_size, and WSIZE.
Referenced by TZip::ideflate().
Definition at line 1722 of file zip.cpp.
References Assert(), TState::ds, TDeflateState::good_match, HASH_BITS, TDeflateState::match_start, TDeflateState::max_chain_length, MAX_DIST, MAX_MATCH, MIN_LOOKAHEAD, TDeflateState::nice_match, NIL, TDeflateState::prev, TDeflateState::prev_length, TDeflateState::strstart, TDeflateState::window, TDeflateState::window_size, and WMASK.
Referenced by deflate(), and deflate_fast().
Definition at line 814 of file zip.cpp.
References TTreeState::heap, TTreeState::heap_len, smaller, and TState::ts.
Referenced by build_tree().
Definition at line 1067 of file zip.cpp.
References TTreeState::bl_tree, ct_data::dl, ct_data::fc, ct_data::freq, ct_data::len, REP_3_6, REPZ_11_138, REPZ_3_10, and TState::ts.
Referenced by build_bl_tree().
| void send_all_trees | ( | TState & | state, |
| int | lcodes, | ||
| int | dcodes, | ||
| int | blcodes | ||
| ) |
Definition at line 1234 of file zip.cpp.
References Assert(), TBitState::bits_sent, BL_CODES, bl_order, TTreeState::bl_tree, TState::bs, D_CODES, ct_data::dl, TTreeState::dyn_dtree, TTreeState::dyn_ltree, L_CODES, ct_data::len, send_bits(), send_tree(), Trace(), and TState::ts.
Referenced by flush_block().
| void send_bits | ( | TState & | state, |
| int | value, | ||
| int | length | ||
| ) |
Definition at line 1510 of file zip.cpp.
References Assert(), TBitState::bi_buf, TBitState::bi_valid, TBitState::bits_sent, TState::bs, Buf_size, and PUTSHORT.
Referenced by compress_block(), flush_block(), send_all_trees(), and send_tree().
Definition at line 1126 of file zip.cpp.
References Assert(), TTreeState::bl_tree, ct_data::dl, ct_data::len, REP_3_6, REPZ_11_138, REPZ_3_10, send_bits(), send_code, and TState::ts.
Referenced by send_all_trees().
| void set_file_type | ( | TState & | state | ) |
Definition at line 1479 of file zip.cpp.
References ASCII, BINARY, TTreeState::dyn_ltree, ct_data::fc, TTreeState::file_type, ct_data::freq, LITERALS, and TState::ts.
Referenced by flush_block().
| void __cdecl Trace | ( | const char * | x, |
| ... | |||
| ) |
Definition at line 630 of file zip.cpp.
Referenced by build_bl_tree(), ct_tally(), flush_block(), gen_bitlen(), gen_codes(), and send_all_trees().
| void update_keys | ( | unsigned long * | keys, |
| char | c | ||
| ) |
Definition at line 2307 of file zip.cpp.
References CRC32.
Referenced by TZip::Add(), and zencode().
| char zencode | ( | unsigned long * | keys, |
| char | c | ||
| ) |
Definition at line 2319 of file zip.cpp.
References decrypt_byte(), and update_keys().
Referenced by TZip::Add(), and TZip::write().
| ZRESULT ZipAdd | ( | HZIP | hz, |
| const TCHAR * | dstzn, | ||
| const TCHAR * | fn | ||
| ) |
Definition at line 3280 of file zip.cpp.
References ZIP_FILENAME, and ZipAddInternal().
Referenced by Zipfile::addFile().
| ZRESULT ZipAdd | ( | HZIP | hz, |
| const TCHAR * | dstzn, | ||
| void * | src, | ||
| unsigned int | len | ||
| ) |
Definition at line 3284 of file zip.cpp.
References ZIP_MEMORY, and ZipAddInternal().
| ZRESULT ZipAddFolder | ( | HZIP | hz, |
| const TCHAR * | dstzn | ||
| ) |
Definition at line 3296 of file zip.cpp.
References ZIP_FOLDER, and ZipAddInternal().
| ZRESULT ZipAddHandle | ( | HZIP | hz, |
| const TCHAR * | dstzn, | ||
| HANDLE | h | ||
| ) |
Definition at line 3288 of file zip.cpp.
References ZIP_HANDLE, and ZipAddInternal().
| ZRESULT ZipAddHandle | ( | HZIP | hz, |
| const TCHAR * | dstzn, | ||
| HANDLE | h, | ||
| unsigned int | len | ||
| ) |
Definition at line 3292 of file zip.cpp.
References ZIP_HANDLE, and ZipAddInternal().
| ZRESULT ZipAddInternal | ( | HZIP | hz, |
| const TCHAR * | dstzn, | ||
| void * | src, | ||
| unsigned int | len, | ||
| DWORD | flags | ||
| ) |
Definition at line 3263 of file zip.cpp.
References TZip::Add(), TZipHandleData::flag, lasterrorZ, TZipHandleData::zip, ZR_ARGS, and ZR_ZMODE.
Referenced by ZipAdd(), ZipAddFolder(), and ZipAddHandle().
| ZRESULT ZipGetMemory | ( | HZIP | hz, |
| void ** | buf, | ||
| unsigned long * | len | ||
| ) |
Definition at line 3303 of file zip.cpp.
References TZipHandleData::flag, TZip::GetMemory(), lasterrorZ, TZipHandleData::zip, ZR_ARGS, and ZR_ZMODE.
Definition at line 323 of file zip.cpp.
Referenced by build_bl_tree(), and send_all_trees().
| const config configuration_table[10] |
| const int extra_blbits[BL_CODES] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7} |
Definition at line 320 of file zip.cpp.
Referenced by TTreeState::TTreeState().
| const int extra_dbits[D_CODES] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13} |
Definition at line 317 of file zip.cpp.
Referenced by compress_block(), ct_init(), ct_tally(), and TTreeState::TTreeState().
| const int extra_lbits[LENGTH_CODES] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0} |
Definition at line 314 of file zip.cpp.
Referenced by compress_block(), ct_init(), and TTreeState::TTreeState().
| bool has_seeded = false |
Definition at line 2915 of file zip.cpp.
Referenced by TZip::Add().
Definition at line 3145 of file zip.cpp.
Referenced by CloseZipZ(), CreateZipInternal(), FormatZipMessageZ(), ZipAddInternal(), and ZipGetMemory().