![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
LZ out window. More...
#include "common.h"
Go to the source code of this file.
Data Structures | |
struct | lzma_dict |
struct | lzma_lz_options |
struct | lzma_lz_decoder |
Macros | |
#define | LZ_DICT_REPEAT_MAX 288 |
#define | LZMA_LZ_DECODER_INIT |
Functions | |
lzma_ret | lzma_lz_decoder_init (lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters, lzma_ret(*lz_init)(lzma_lz_decoder *lz, const lzma_allocator *allocator, lzma_vli id, const void *options, lzma_lz_options *lz_options)) |
uint64_t | lzma_lz_decoder_memusage (size_t dictionary_size) |
LZ out window.
#define LZ_DICT_REPEAT_MAX 288 |
Maximum length of a match rounded up to a nice power of 2 which is a good size for aligned memcpy(). The allocated dictionary buffer will be 2 * LZ_DICT_REPEAT_MAX bytes larger than the actual dictionary size:
(1) Every time the decoder reaches the end of the dictionary buffer, the last LZ_DICT_REPEAT_MAX bytes will be copied to the beginning. This way dict_repeat() will only need to copy from one place, never from both the end and beginning of the buffer.
(2) The other LZ_DICT_REPEAT_MAX bytes is kept as a buffer between the oldest byte still in the dictionary and the current write position. This way dict_repeat(dict, dict->size - 1, &len) won't need memmove() as the copying cannot overlap.
Note that memcpy() still cannot be used if distance < len.
LZMA's longest match length is 273 so pick a multiple of 16 above that.
#define LZMA_LZ_DECODER_INIT |
|
extern |
|
extern |