lzma_encoder.c   lzma_encoder.c 
skipping to change at line 531 skipping to change at line 531
coder->match_price_count = UINT32_MAX / 2; coder->match_price_count = UINT32_MAX / 2;
coder->align_price_count = UINT32_MAX / 2; coder->align_price_count = UINT32_MAX / 2;
coder->opts_end_index = 0; coder->opts_end_index = 0;
coder->opts_current_index = 0; coder->opts_current_index = 0;
return LZMA_OK; return LZMA_OK;
} }
extern lzma_ret extern lzma_ret
lzma_lzma_encoder_create(lzma_coder **coder_ptr, lzma_allocator *allocator, lzma_lzma_encoder_create(lzma_coder **coder_ptr,
const lzma_allocator *allocator,
const lzma_options_lzma *options, lzma_lz_options *lz_option s) const lzma_options_lzma *options, lzma_lz_options *lz_option s)
{ {
// Allocate lzma_coder if it wasn't already allocated. // Allocate lzma_coder if it wasn't already allocated.
if (*coder_ptr == NULL) { if (*coder_ptr == NULL) {
*coder_ptr = lzma_alloc(sizeof(lzma_coder), allocator); *coder_ptr = lzma_alloc(sizeof(lzma_coder), allocator);
if (*coder_ptr == NULL) if (*coder_ptr == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
} }
lzma_coder *coder = *coder_ptr; lzma_coder *coder = *coder_ptr;
skipping to change at line 589 skipping to change at line 590
coder->is_initialized = options->preset_dict != NULL coder->is_initialized = options->preset_dict != NULL
&& options->preset_dict_size > 0; && options->preset_dict_size > 0;
coder->is_flushed = false; coder->is_flushed = false;
set_lz_options(lz_options, options); set_lz_options(lz_options, options);
return lzma_lzma_encoder_reset(coder, options); return lzma_lzma_encoder_reset(coder, options);
} }
static lzma_ret static lzma_ret
lzma_encoder_init(lzma_lz_encoder *lz, lzma_allocator *allocator, lzma_encoder_init(lzma_lz_encoder *lz, const lzma_allocator *allocator,
const void *options, lzma_lz_options *lz_options) const void *options, lzma_lz_options *lz_options)
{ {
lz->code = &lzma_encode; lz->code = &lzma_encode;
return lzma_lzma_encoder_create( return lzma_lzma_encoder_create(
&lz->coder, allocator, options, lz_options); &lz->coder, allocator, options, lz_options);
} }
extern lzma_ret extern lzma_ret
lzma_lzma_encoder_init(lzma_next_coder *next, lzma_allocator *allocator, lzma_lzma_encoder_init(lzma_next_coder *next, const lzma_allocator *allocat or,
const lzma_filter_info *filters) const lzma_filter_info *filters)
{ {
return lzma_lz_encoder_init( return lzma_lz_encoder_init(
next, allocator, filters, &lzma_encoder_init); next, allocator, filters, &lzma_encoder_init);
} }
extern uint64_t extern uint64_t
lzma_lzma_encoder_memusage(const void *options) lzma_lzma_encoder_memusage(const void *options)
{ {
if (!is_options_valid(options)) if (!is_options_valid(options))
 End of changes. 3 change blocks. 
3 lines changed or deleted 4 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/