Rizin
unix-like reverse engineering framework and cli tools
|
Compresses or uncompresses a file. More...
Go to the source code of this file.
Enumerations | |
enum | operation_mode { MODE_COMPRESS , MODE_DECOMPRESS , MODE_TEST , MODE_LIST } |
enum | format_type { FORMAT_AUTO , FORMAT_XZ , FORMAT_LZMA , FORMAT_RAW } |
Functions | |
void | coder_set_check (lzma_check check) |
Set the integrity check type used when compressing. More... | |
void | coder_set_preset (uint32_t new_preset) |
Set preset number. More... | |
void | coder_set_extreme (void) |
Enable extreme mode. More... | |
void | coder_add_filter (lzma_vli id, void *options) |
Add a filter to the custom filter chain. More... | |
void | coder_set_compression_settings (void) |
void | coder_run (const char *filename) |
Compress or decompress the given file. More... | |
void | coder_free (void) |
Free the memory allocated for the coder and kill the worker threads. More... | |
Variables | |
enum operation_mode | opt_mode |
enum format_type | opt_format |
bool | opt_auto_adjust |
bool | opt_single_stream |
If true, stop after decoding the first stream. More... | |
uint64_t | opt_block_size |
uint64_t * | opt_block_list |
Compresses or uncompresses a file.
Definition in file coder.h.
enum format_type |
enum operation_mode |
void coder_add_filter | ( | lzma_vli | id, |
void * | options | ||
) |
Add a filter to the custom filter chain.
Definition at line 107 of file coder.c.
References _, filters, filters_count, id, lzma_filter::id, LZMA_FILTERS_MAX, LZMA_PRESET_DEFAULT, message_fatal(), options, lzma_filter::options, and preset_number.
Referenced by parse_real().
void coder_free | ( | void | ) |
void coder_run | ( | const char * | filename | ) |
Compress or decompress the given file.
Definition at line 869 of file coder.c.
References lzma_stream::avail_in, coder_init(), CODER_INIT_ERROR, CODER_INIT_PASSTHRU, coder_normal(), coder_passthru(), in_buf, in_size, IO_BUFFER_SIZE, io_close(), io_open_dest(), io_open_src(), io_read(), message_filename(), message_progress_end(), message_progress_start(), MODE_COMPRESS, MODE_TEST, mytime_set_start_time(), lzma_stream::next_in, NULL, opt_mode, SIZE_MAX, file_pair::src_st, strm, io_buf::u8, and user_abort.
Referenced by main().
void coder_set_check | ( | lzma_check | check | ) |
Set the integrity check type used when compressing.
Definition at line 64 of file coder.c.
References check, and check_default.
Referenced by parse_real().
void coder_set_compression_settings | ( | void | ) |
Definition at line 137 of file coder.c.
Referenced by args_parse().
void coder_set_extreme | ( | void | ) |
Enable extreme mode.
Definition at line 98 of file coder.c.
References forget_filter_chain(), LZMA_PRESET_EXTREME, and preset_number.
Referenced by parse_real().
void coder_set_preset | ( | uint32_t | new_preset | ) |
Set preset number.
Definition at line 88 of file coder.c.
References forget_filter_chain(), LZMA_PRESET_LEVEL_MASK, and preset_number.
Referenced by parse_real().
|
extern |
If true, the compression settings are automatically adjusted down if they exceed the memory usage limit.
Definition at line 26 of file coder.c.
Referenced by coder_init(), and parse_real().
|
extern |
This is non-NULL if –block-list was used. This contains the Block sizes as an array that is terminated with 0.
Definition at line 29 of file coder.c.
Referenced by args_free(), coder_normal(), parse_block_list(), and split_block().
|
extern |
If non-zero, start a new .xz Block after every opt_block_size bytes of input. This has an effect only when compressing to the .xz format.
Definition at line 28 of file coder.c.
Referenced by coder_init(), coder_normal(), parse_real(), and split_block().
|
extern |
File format to use when encoding or what format(s) to accept when decoding. This is a global because it's needed also in suffix.c. This is set in args.c.
Definition at line 1 of file coder.c.
Referenced by args_parse(), coder_init(), coder_normal(), compressed_name(), list_file(), parse_real(), and uncompressed_name().
|
extern |
Operation mode of the command line tool. This is set in args.c and read in several files.
Definition at line 1 of file coder.c.
Referenced by args_parse(), coder_init(), coder_normal(), coder_run(), coder_write_output(), io_open_dest_real(), io_open_src_real(), main(), message_filename(), message_mem_needed(), mytime_get_flush_timeout(), parse_real(), print_filename(), progress_pos(), and suffix_get_dest_name().
|
extern |
If true, stop after decoding the first stream.
Definition at line 27 of file coder.c.
Referenced by coder_normal(), and parse_real().