Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <utime.h>
#include "zlib.h"
Go to the source code of this file.
Classes | |
struct | ind |
struct | outd |
Macros | |
#define | local static |
#define | SIZE 32768U /* input and output buffer sizes */ |
#define | PIECE 16384 /* limits i/o chunks for 16-bit int case */ |
#define | NEXT() |
#define | FLUSHCODE() |
Functions | |
unsigned | in (void *in_desc, z_const unsigned char **buf) |
int | out (void *out_desc, unsigned char *buf, unsigned len) |
int | lunpipe (unsigned have, z_const unsigned char *next, struct ind *indp, int outfile, z_stream *strm) |
int | gunpipe (z_stream *strm, int infile, int outfile) |
void | copymeta (char *from, char *to) |
int | gunzip (z_stream *strm, char *inname, char *outname, int test) |
int | main (int argc, char **argv) |
Variables | |
unsigned char | inbuf [SIZE] |
unsigned char | outbuf [SIZE] |
unsigned short | prefix [65536] |
unsigned char | suffix [65536] |
unsigned char | match [65280+2] |
#define FLUSHCODE | ( | ) |
#define NEXT | ( | ) |
void copymeta | ( | char * | from, |
char * | to | ||
) |
Definition at line 517 of file gun.c.
References chmod, chown, from, stat, to, and utime.
Referenced by gunzip().
Definition at line 383 of file gun.c.
References lzma_stream::avail_in, outd::check, outd::crc, crc32(), flags, in(), ind::inbuf, inbuf, ind::infile, inflateBack(), int, L, len, lunpipe(), NEXT, lzma_stream::next_in, NULL, out(), outfile, outd::outfile, strm, outd::total, unsigned, Z_BUF_ERROR, z_const, Z_DATA_ERROR, Z_ERRNO, Z_NULL, Z_OK, and Z_STREAM_END.
Referenced by gunzip().
Definition at line 548 of file gun.c.
References close, copymeta(), gunpipe(), lzma_stream::next_in, NULL, O_CREAT, O_RDONLY, O_TRUNC, O_WRONLY, outfile, strm, unlink, Z_BUF_ERROR, Z_DATA_ERROR, Z_ERRNO, Z_MEM_ERROR, Z_NULL, and Z_OK.
Referenced by main().
Definition at line 89 of file gun.c.
References ind::inbuf, ind::infile, int, len, PIECE, read(), and SIZE.
Referenced by gunpipe().
int lunpipe | ( | unsigned | have, |
z_const unsigned char * | next, | ||
struct ind * | indp, | ||
int | outfile, | ||
z_stream * | strm | ||
) |
Definition at line 200 of file gun.c.
References bits(), outd::check, code, test_evm::end, flags, FLUSHCODE, mask, match, max, NEXT, lzma_stream::next_in, out(), outbuf, outfile, outd::outfile, p, prefix, SIZE, stack, strm, suffix, unsigned, Z_BUF_ERROR, Z_DATA_ERROR, and Z_OK.
Referenced by gunpipe().
Definition at line 631 of file gun.c.
References argv, free(), gunzip(), inflateBackEnd(), inflateBackInit, int, len, malloc(), match, memcpy(), NULL, strm, test_customized_mnem::test(), Z_NULL, and Z_OK.
Definition at line 131 of file gun.c.
References outd::check, outd::crc, crc32(), int, len, outd::outfile, PIECE, outd::total, and write.
Definition at line 161 of file gun.c.
Referenced by blowfish_crypt(), blowfish_decrypt(), compress(), decompress(), F(), gunpipe(), lzss_decompress(), rc2_crypt(), rc2_crypt8(), rc2_dcrypt(), rc2_dcrypt8(), rc4_crypt(), rc6_decrypt(), rc6_encrypt(), rol_crypt(), ror_crypt(), rot_crypt(), rot_decrypt(), and xor_crypt().
Definition at line 165 of file gun.c.
Referenced by _zip_find_central_dir(), diff_hexdump_partial(), find_longest_match(), FUZ_fillCompressibleNoiseBuffer(), inflate_table(), longest_match(), lunpipe(), LZ4_compress_generic_validated(), LZ4_decompress_generic(), LZ4HC_FindLongerMatch(), main(), match_new(), RDG_genBlock(), rz_regex_get_match_list(), rz_search_regexp_update(), ts_query_captures_wasm(), ts_query_matches_wasm(), and types_enum_member_find_all().
Definition at line 162 of file gun.c.
Referenced by blowfish_crypt(), blowfish_decrypt(), compress(), decompress(), lunpipe(), rc2_crypt(), rc2_crypt8(), rc2_dcrypt(), rc2_dcrypt8(), rc4_crypt(), rc6_decrypt(), rc6_encrypt(), rol_crypt(), ror_crypt(), rot_crypt(), rot_decrypt(), rz_print_format_register(), rz_type_format_10bytes(), rz_type_format_bitfield(), rz_type_format_byte(), rz_type_format_char(), rz_type_format_data(), rz_type_format_data_internal(), rz_type_format_decchar(), rz_type_format_double(), rz_type_format_enum(), rz_type_format_float(), rz_type_format_hex(), rz_type_format_hexflag(), rz_type_format_hexpairs(), rz_type_format_int(), rz_type_format_nulltermstring(), rz_type_format_nulltermwidestring(), rz_type_format_num(), rz_type_format_num_specifier(), rz_type_format_octal(), rz_type_format_quadword(), rz_type_format_string(), rz_type_format_struct(), rz_type_format_time(), rz_type_format_u128(), rz_type_format_uleb(), rz_type_format_word(), xor_crypt(), z80asm(), and zip_fread().
unsigned short prefix[65536] |
Definition at line 163 of file gun.c.
Referenced by __childrenFlagsOf(), __rotate_panel_cmds(), _CbInRangeSearchV(), add_map(), cmd_print_format(), d_substitution(), decode_prefix(), diff_output_data(), diff_unified_append_data(), diff_unified_lines_hl(), diffrow(), ds_esc_str(), ds_print_str(), extract_sections_symbols(), find_include(), get_pkt_indicator(), lunpipe(), main_print_var(), mpc_err_count(), mpc_err_repeat(), myregwrite(), print_register_list(), printRegbitsRange(), process_constructors(), reloc_set_flag(), rtti_itanium_print_class_type_info(), rtti_itanium_print_si_class_type_info(), rtti_itanium_print_vmi_class_type_info(), rtti_msvc_print_base_class_descriptor(), rtti_msvc_print_class_hierarchy_descriptor(), rtti_msvc_print_complete_object_locator(), rtti_msvc_print_type_descriptor(), rz_cons_pal_list(), rz_core_get_boundaries_prot(), rz_egg_lang_include_init(), rz_file_mkstemp(), rz_file_temp(), RZ_PACKED(), rz_str_between(), sections_from_mach0(), uv_interface_addresses(), and xap_decode().
unsigned char suffix[65536] |
Definition at line 164 of file gun.c.
Referenced by cmd_foreach_cmdname_modes(), compressed_name(), d_clone_suffix(), d_expression_1(), d_print_mod_list(), diffrow(), fill_modes_children_chars(), get_ext_suffix(), is_valid_argv_modes(), lunpipe(), LZ4IO_compressMultipleFilenames(), LZ4IO_compressMultipleFilenames_Legacy(), LZ4IO_decompressMultipleFilenames(), mode_cmd_desc_help(), msg_suffix(), rz_file_mkstemp(), rz_str_between(), rz_syscmd_mkdir(), suffix2mode(), suffix_set(), test_suffix(), and uint64_to_nicestr().