lz_encoder.h | lz_encoder.h | |||
---|---|---|---|---|
skipping to change at line 120 | skipping to change at line 120 | |||
/// If the longest match found by the match finder is nice_len, | /// If the longest match found by the match finder is nice_len, | |||
/// mf_find() tries to expand it up to match_len_max bytes. | /// mf_find() tries to expand it up to match_len_max bytes. | |||
uint32_t match_len_max; | uint32_t match_len_max; | |||
/// When running out of input, binary tree match finders need to kno w | /// When running out of input, binary tree match finders need to kno w | |||
/// if it is due to flushing or finishing. The action is used also | /// if it is due to flushing or finishing. The action is used also | |||
/// by the LZ-based encoders themselves. | /// by the LZ-based encoders themselves. | |||
lzma_action action; | lzma_action action; | |||
/// Number of elements in hash[] | /// Number of elements in hash[] | |||
uint32_t hash_size_sum; | uint32_t hash_count; | |||
/// Number of elements in son[] | /// Number of elements in son[] | |||
uint32_t sons_count; | uint32_t sons_count; | |||
}; | }; | |||
typedef struct { | typedef struct { | |||
/// Extra amount of data to keep available before the "actual" | /// Extra amount of data to keep available before the "actual" | |||
/// dictionary. | /// dictionary. | |||
size_t before_size; | size_t before_size; | |||
skipping to change at line 197 | skipping to change at line 197 | |||
typedef struct { | typedef struct { | |||
/// Data specific to the LZ-based encoder | /// Data specific to the LZ-based encoder | |||
lzma_coder *coder; | lzma_coder *coder; | |||
/// Function to encode from *dict to out[] | /// Function to encode from *dict to out[] | |||
lzma_ret (*code)(lzma_coder *restrict coder, | lzma_ret (*code)(lzma_coder *restrict coder, | |||
lzma_mf *restrict mf, uint8_t *restrict out, | lzma_mf *restrict mf, uint8_t *restrict out, | |||
size_t *restrict out_pos, size_t out_size); | size_t *restrict out_pos, size_t out_size); | |||
/// Free allocated resources | /// Free allocated resources | |||
void (*end)(lzma_coder *coder, lzma_allocator *allocator); | void (*end)(lzma_coder *coder, const lzma_allocator *allocator); | |||
/// Update the options in the middle of the encoding. | /// Update the options in the middle of the encoding. | |||
lzma_ret (*options_update)(lzma_coder *coder, | lzma_ret (*options_update)(lzma_coder *coder, | |||
const lzma_filter *filter); | const lzma_filter *filter); | |||
} lzma_lz_encoder; | } lzma_lz_encoder; | |||
// Basic steps: | // Basic steps: | |||
// 1. Input gets copied into the dictionary. | // 1. Input gets copied into the dictionary. | |||
// 2. Data in dictionary gets run through the match finder byte by byte. | // 2. Data in dictionary gets run through the match finder byte by byte. | |||
skipping to change at line 285 | skipping to change at line 285 | |||
memcpy(out + *out_pos, mf->buffer + mf->read_pos - *left, | memcpy(out + *out_pos, mf->buffer + mf->read_pos - *left, | |||
copy_size); | copy_size); | |||
*out_pos += copy_size; | *out_pos += copy_size; | |||
*left -= copy_size; | *left -= copy_size; | |||
return; | return; | |||
} | } | |||
extern lzma_ret lzma_lz_encoder_init( | extern lzma_ret lzma_lz_encoder_init( | |||
lzma_next_coder *next, lzma_allocator *allocator, | lzma_next_coder *next, const lzma_allocator *allocator, | |||
const lzma_filter_info *filters, | const lzma_filter_info *filters, | |||
lzma_ret (*lz_init)(lzma_lz_encoder *lz, | lzma_ret (*lz_init)(lzma_lz_encoder *lz, | |||
lzma_allocator *allocator, const void *options, | const lzma_allocator *allocator, const void *options , | |||
lzma_lz_options *lz_options)); | lzma_lz_options *lz_options)); | |||
extern uint64_t lzma_lz_encoder_memusage(const lzma_lz_options *lz_options) ; | extern uint64_t lzma_lz_encoder_memusage(const lzma_lz_options *lz_options) ; | |||
// These are only for LZ encoder's internal use. | // These are only for LZ encoder's internal use. | |||
extern uint32_t lzma_mf_find( | extern uint32_t lzma_mf_find( | |||
lzma_mf *mf, uint32_t *count, lzma_match *matches); | lzma_mf *mf, uint32_t *count, lzma_match *matches); | |||
extern uint32_t lzma_mf_hc3_find(lzma_mf *dict, lzma_match *matches); | extern uint32_t lzma_mf_hc3_find(lzma_mf *dict, lzma_match *matches); | |||
extern void lzma_mf_hc3_skip(lzma_mf *dict, uint32_t amount); | extern void lzma_mf_hc3_skip(lzma_mf *dict, uint32_t amount); | |||
End of changes. 4 change blocks. | ||||
4 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/ |