|
Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
| #define | BITS_TYPE struct mszipd_stream |
| #define | BITS_VAR zip |
| #define | BITS_ORDER_LSB |
| #define | BITS_LSB_TABLE |
| #define | READ_BYTES |
| #define | TABLEBITS(tbl) MSZIP_##tbl##_TABLEBITS |
| #define | MAXSYMBOLS(tbl) MSZIP_##tbl##_MAXSYMBOLS |
| #define | HUFF_TABLE(tbl, idx) zip->tbl##_table[idx] |
| #define | HUFF_LEN(tbl, idx) zip->tbl##_len[idx] |
| #define | HUFF_ERROR return INF_ERR_HUFFSYM |
| #define | FLUSH_IF_NEEDED |
| #define | INF_ERR_BLOCKTYPE (-1) /* unknown block type */ |
| #define | INF_ERR_COMPLEMENT (-2) /* block size complement mismatch */ |
| #define | INF_ERR_FLUSH (-3) /* error from flush_window() callback */ |
| #define | INF_ERR_BITBUF (-4) /* too many bits in bit buffer */ |
| #define | INF_ERR_SYMLENS (-5) /* too many symbols in blocktype 2 header */ |
| #define | INF_ERR_BITLENTBL (-6) /* failed to build bitlens huffman table */ |
| #define | INF_ERR_LITERALTBL (-7) /* failed to build literals huffman table */ |
| #define | INF_ERR_DISTANCETBL (-8) /* failed to build distance huffman table */ |
| #define | INF_ERR_BITOVERRUN (-9) /* bitlen RLE code goes over table size */ |
| #define | INF_ERR_BADBITLEN (-10) /* invalid bit-length code */ |
| #define | INF_ERR_LITCODE (-11) /* out-of-range literal code */ |
| #define | INF_ERR_DISTCODE (-12) /* out-of-range distance code */ |
| #define | INF_ERR_DISTANCE (-13) /* somehow, distance is beyond 32k */ |
| #define | INF_ERR_HUFFSYM (-14) /* out of bits decoding huffman symbol */ |
Functions | |
| static int | zip_read_lens (struct mszipd_stream *zip) |
| static int | inflate (struct mszipd_stream *zip) |
| static int | mszipd_flush_window (struct mszipd_stream *zip, unsigned int data_flushed) |
| struct mszipd_stream * | mszipd_init (struct mspack_system *system, struct mspack_file *input, struct mspack_file *output, int input_buffer_size, int repair_mode) |
| int | mszipd_decompress (struct mszipd_stream *zip, off_t out_bytes) |
| int | mszipd_decompress_kwaj (struct mszipd_stream *zip) |
| void | mszipd_free (struct mszipd_stream *zip) |
Variables | |
| static const unsigned short | lit_lengths [29] |
| static const unsigned short | dist_offsets [30] |
| static const unsigned char | lit_extrabits [29] |
| static const unsigned char | dist_extrabits [30] |
| static const unsigned char | bitlen_order [19] |
| #define BITS_TYPE struct mszipd_stream |
| #define FLUSH_IF_NEEDED |
| #define HUFF_ERROR return INF_ERR_HUFFSYM |
| #define INF_ERR_COMPLEMENT (-2) /* block size complement mismatch */ |
| #define INF_ERR_DISTANCE (-13) /* somehow, distance is beyond 32k */ |
| #define READ_BYTES |
|
static |
Definition at line 157 of file mszipd.c.
References code, dist_extrabits, dist_offsets, FLUSH_IF_NEEDED, i, INF_ERR_BITBUF, INF_ERR_BLOCKTYPE, INF_ERR_COMPLEMENT, INF_ERR_DISTANCETBL, INF_ERR_DISTCODE, INF_ERR_FLUSH, INF_ERR_LITCODE, INF_ERR_LITERALTBL, length, lit_extrabits, lit_lengths, make_decode_table(), MSZIP_DISTANCE_MAXSYMBOLS, MSZIP_DISTANCE_TABLEBITS, MSZIP_FRAME_SIZE, MSZIP_LITERAL_MAXSYMBOLS, MSZIP_LITERAL_TABLEBITS, PEEK_BITS, READ_BITS, READ_HUFFSYM, READ_IF_NEEDED, REMOVE_BITS, RESTORE_BITS, STORE_BITS, while(), and zip_read_lens().
Referenced by mszipd_decompress(), and mszipd_decompress_kwaj().
| int mszipd_decompress | ( | struct mszipd_stream * | zip, |
| off_t | out_bytes | ||
| ) |
| int mszipd_decompress_kwaj | ( | struct mszipd_stream * | zip | ) |
|
static |
Definition at line 330 of file mszipd.c.
References D, and MSZIP_FRAME_SIZE.
Referenced by mszipd_init().
| void mszipd_free | ( | struct mszipd_stream * | zip | ) |
Definition at line 508 of file mszipd.c.
| struct mszipd_stream* mszipd_init | ( | struct mspack_system * | system, |
| struct mspack_file * | input, | ||
| struct mspack_file * | output, | ||
| int | input_buffer_size, | ||
| int | repair_mode | ||
| ) |
Definition at line 342 of file mszipd.c.
|
static |
Definition at line 91 of file mszipd.c.
References bitlen_order, code, D, ENSURE_BITS, i, INF_ERR_BADBITLEN, INF_ERR_BITLENTBL, INF_ERR_BITOVERRUN, INF_ERR_SYMLENS, make_decode_table(), MSZIP_DISTANCE_MAXSYMBOLS, MSZIP_LITERAL_MAXSYMBOLS, PEEK_BITS, READ_BITS, REMOVE_BITS, RESTORE_BITS, run(), and STORE_BITS.
Referenced by inflate().
Definition at line 71 of file mszipd.c.
Referenced by zip_read_lens().