Deleted Added
full compact
lz_encoder.h (292588) lz_encoder.h (312518)
1///////////////////////////////////////////////////////////////////////////////
2//
3/// \file lz_encoder.h
4/// \brief LZ in window and match finder API
5///
6// Authors: Igor Pavlov
7// Lasse Collin
8//

--- 177 unchanged lines hidden (view full) ---

186// if the encoded result is smaller than the uncompressed one. If the chunk
187// was uncompressible, it is better to store it in uncompressed form in
188// the output stream. To do this, the whole uncompressed chunk has to be
189// still available in the history buffer. before_size achieves that.
190
191
192typedef struct {
193 /// Data specific to the LZ-based encoder
1///////////////////////////////////////////////////////////////////////////////
2//
3/// \file lz_encoder.h
4/// \brief LZ in window and match finder API
5///
6// Authors: Igor Pavlov
7// Lasse Collin
8//

--- 177 unchanged lines hidden (view full) ---

186// if the encoded result is smaller than the uncompressed one. If the chunk
187// was uncompressible, it is better to store it in uncompressed form in
188// the output stream. To do this, the whole uncompressed chunk has to be
189// still available in the history buffer. before_size achieves that.
190
191
192typedef struct {
193 /// Data specific to the LZ-based encoder
194 lzma_coder *coder;
194 void *coder;
195
196 /// Function to encode from *dict to out[]
195
196 /// Function to encode from *dict to out[]
197 lzma_ret (*code)(lzma_coder *restrict coder,
197 lzma_ret (*code)(void *coder,
198 lzma_mf *restrict mf, uint8_t *restrict out,
199 size_t *restrict out_pos, size_t out_size);
200
201 /// Free allocated resources
198 lzma_mf *restrict mf, uint8_t *restrict out,
199 size_t *restrict out_pos, size_t out_size);
200
201 /// Free allocated resources
202 void (*end)(lzma_coder *coder, const lzma_allocator *allocator);
202 void (*end)(void *coder, const lzma_allocator *allocator);
203
204 /// Update the options in the middle of the encoding.
203
204 /// Update the options in the middle of the encoding.
205 lzma_ret (*options_update)(lzma_coder *coder,
206 const lzma_filter *filter);
205 lzma_ret (*options_update)(void *coder, const lzma_filter *filter);
207
208} lzma_lz_encoder;
209
210
211// Basic steps:
212// 1. Input gets copied into the dictionary.
213// 2. Data in dictionary gets run through the match finder byte by byte.
214// 3. The literals and matches are encoded using e.g. LZMA.

--- 114 unchanged lines hidden ---
206
207} lzma_lz_encoder;
208
209
210// Basic steps:
211// 1. Input gets copied into the dictionary.
212// 2. Data in dictionary gets run through the match finder byte by byte.
213// 3. The literals and matches are encoded using e.g. LZMA.

--- 114 unchanged lines hidden ---