lz_decoder.h (292588) | lz_decoder.h (312518) |
---|---|
1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file lz_decoder.h 4/// \brief LZ out window 5/// 6// Authors: Igor Pavlov 7// Lasse Collin 8// --- 39 unchanged lines hidden (view full) --- 48 size_t dict_size; 49 const uint8_t *preset_dict; 50 size_t preset_dict_size; 51} lzma_lz_options; 52 53 54typedef struct { 55 /// Data specific to the LZ-based decoder | 1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file lz_decoder.h 4/// \brief LZ out window 5/// 6// Authors: Igor Pavlov 7// Lasse Collin 8// --- 39 unchanged lines hidden (view full) --- 48 size_t dict_size; 49 const uint8_t *preset_dict; 50 size_t preset_dict_size; 51} lzma_lz_options; 52 53 54typedef struct { 55 /// Data specific to the LZ-based decoder |
56 lzma_coder *coder; | 56 void *coder; |
57 58 /// Function to decode from in[] to *dict | 57 58 /// Function to decode from in[] to *dict |
59 lzma_ret (*code)(lzma_coder *restrict coder, | 59 lzma_ret (*code)(void *coder, |
60 lzma_dict *restrict dict, const uint8_t *restrict in, 61 size_t *restrict in_pos, size_t in_size); 62 | 60 lzma_dict *restrict dict, const uint8_t *restrict in, 61 size_t *restrict in_pos, size_t in_size); 62 |
63 void (*reset)(lzma_coder *coder, const void *options); | 63 void (*reset)(void *coder, const void *options); |
64 65 /// Set the uncompressed size | 64 65 /// Set the uncompressed size |
66 void (*set_uncompressed)(lzma_coder *coder, 67 lzma_vli uncompressed_size); | 66 void (*set_uncompressed)(void *coder, lzma_vli uncompressed_size); |
68 69 /// Free allocated resources | 67 68 /// Free allocated resources |
70 void (*end)(lzma_coder *coder, const lzma_allocator *allocator); | 69 void (*end)(void *coder, const lzma_allocator *allocator); |
71 72} lzma_lz_decoder; 73 74 75#define LZMA_LZ_DECODER_INIT \ 76 (lzma_lz_decoder){ \ 77 .coder = NULL, \ 78 .code = NULL, \ --- 8 unchanged lines hidden (view full) --- 87 const lzma_filter_info *filters, 88 lzma_ret (*lz_init)(lzma_lz_decoder *lz, 89 const lzma_allocator *allocator, const void *options, 90 lzma_lz_options *lz_options)); 91 92extern uint64_t lzma_lz_decoder_memusage(size_t dictionary_size); 93 94extern void lzma_lz_decoder_uncompressed( | 70 71} lzma_lz_decoder; 72 73 74#define LZMA_LZ_DECODER_INIT \ 75 (lzma_lz_decoder){ \ 76 .coder = NULL, \ 77 .code = NULL, \ --- 8 unchanged lines hidden (view full) --- 86 const lzma_filter_info *filters, 87 lzma_ret (*lz_init)(lzma_lz_decoder *lz, 88 const lzma_allocator *allocator, const void *options, 89 lzma_lz_options *lz_options)); 90 91extern uint64_t lzma_lz_decoder_memusage(size_t dictionary_size); 92 93extern void lzma_lz_decoder_uncompressed( |
95 lzma_coder *coder, lzma_vli uncompressed_size); | 94 void *coder, lzma_vli uncompressed_size); |
96 97 98////////////////////// 99// Inline functions // 100////////////////////// 101 102/// Get a byte from the history buffer. 103static inline uint8_t --- 132 unchanged lines hidden --- | 95 96 97////////////////////// 98// Inline functions // 99////////////////////// 100 101/// Get a byte from the history buffer. 102static inline uint8_t --- 132 unchanged lines hidden --- |