Rizin
unix-like reverse engineering framework and cli tools
|
LZMA2 encoder. More...
Go to the source code of this file.
Classes | |
struct | lzma_lzma2_coder |
Functions | |
static void | lzma2_header_lzma (lzma_lzma2_coder *coder) |
static void | lzma2_header_uncompressed (lzma_lzma2_coder *coder) |
static lzma_ret | lzma2_encode (void *coder_ptr, lzma_mf *restrict mf, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size) |
static void | lzma2_encoder_end (void *coder_ptr, const lzma_allocator *allocator) |
static lzma_ret | lzma2_encoder_options_update (void *coder_ptr, const lzma_filter *filter) |
static lzma_ret | lzma2_encoder_init (lzma_lz_encoder *lz, const lzma_allocator *allocator, const void *options, lzma_lz_options *lz_options) |
lzma_ret | lzma_lzma2_encoder_init (lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters) |
uint64_t | lzma_lzma2_encoder_memusage (const void *options) |
lzma_ret | lzma_lzma2_props_encode (const void *options, uint8_t *out) |
uint64_t | lzma_lzma2_block_size (const void *options) |
LZMA2 encoder.
Definition in file lzma2_encoder.c.
|
static |
Definition at line 136 of file lzma2_encoder.c.
References assert(), limit, LZMA2_CHUNK_MAX, lzma2_header_lzma(), LZMA2_HEADER_MAX, lzma2_header_uncompressed(), LZMA2_HEADER_UNCOMPRESSED, LZMA2_UNCOMPRESSED_MAX, lzma_bufcpy(), LZMA_FINISH, lzma_lzma_encode(), lzma_lzma_encoder_reset(), LZMA_OK, LZMA_RUN, LZMA_STREAM_END, mf_read(), mf_unencoded(), out, out_pos, restrict, and return_if_error.
Referenced by lzma2_encoder_init().
|
static |
Definition at line 267 of file lzma2_encoder.c.
References allocator, lzma_lzma2_coder::lzma, and lzma_free().
Referenced by lzma2_encoder_init().
|
static |
Definition at line 312 of file lzma2_encoder.c.
References allocator, lzma_lz_options::before_size, lzma_lz_encoder::code, lzma_lz_encoder::coder, lzma_lz_options::dict_size, lzma_lz_encoder::end, lzma_lzma2_coder::lzma, LZMA2_CHUNK_MAX, lzma2_encode(), lzma2_encoder_end(), lzma2_encoder_options_update(), lzma_alloc(), lzma_lzma_encoder_create(), LZMA_MEM_ERROR, LZMA_OK, LZMA_PROG_ERROR, lzma_lzma2_coder::need_dictionary_reset, lzma_lzma2_coder::need_properties, lzma_lzma2_coder::need_state_reset, NULL, lzma_lzma2_coder::opt_cur, options, lzma_lz_encoder::options_update, lzma_options_lzma::preset_dict, lzma_options_lzma::preset_dict_size, and return_if_error.
Referenced by lzma_lzma2_encoder_init().
|
static |
Definition at line 277 of file lzma2_encoder.c.
References lzma_options_lzma::lc, lzma_options_lzma::lp, LZMA_LCLP_MAX, LZMA_OK, LZMA_OPTIONS_ERROR, LZMA_PB_MAX, LZMA_PROG_ERROR, lzma_lzma2_coder::need_properties, lzma_lzma2_coder::need_state_reset, NULL, lzma_lzma2_coder::opt_cur, and lzma_options_lzma::pb.
Referenced by lzma2_encoder_init().
|
static |
Definition at line 55 of file lzma2_encoder.c.
References assert(), lzma_lzma2_coder::buf, lzma_lzma2_coder::buf_pos, lzma_lzma2_coder::compressed_size, LZMA2_CHUNK_MAX, LZMA2_HEADER_MAX, LZMA2_UNCOMPRESSED_MAX, lzma_lzma_lclppb_encode(), lzma_lzma2_coder::need_dictionary_reset, lzma_lzma2_coder::need_properties, lzma_lzma2_coder::need_state_reset, lzma_lzma2_coder::opt_cur, pos, and lzma_lzma2_coder::uncompressed_size.
Referenced by lzma2_encode().
|
static |
Definition at line 111 of file lzma2_encoder.c.
References assert(), lzma_lzma2_coder::buf, lzma_lzma2_coder::buf_pos, LZMA2_CHUNK_MAX, lzma_lzma2_coder::need_dictionary_reset, and lzma_lzma2_coder::uncompressed_size.
Referenced by lzma2_encode().
Definition at line 404 of file lzma2_encoder.c.
References lzma_options_lzma::dict_size, my_max, options, and UINT64_C.
lzma_ret lzma_lzma2_encoder_init | ( | lzma_next_coder * | next, |
const lzma_allocator * | allocator, | ||
const lzma_filter_info * | filters | ||
) |
Definition at line 359 of file lzma2_encoder.c.
References allocator, filters, lzma2_encoder_init(), and lzma_lz_encoder_init().
Definition at line 368 of file lzma2_encoder.c.
References lzma_lzma_encoder_memusage(), options, and UINT64_MAX.
Definition at line 379 of file lzma2_encoder.c.
References d, lzma_options_lzma::dict_size, get_dist_slot(), LZMA_DICT_SIZE_MIN, LZMA_OK, my_max, options, out, and UINT32_MAX.