XZ Utils 5.3.5beta
|
Decode MicroLZMA format. More...
Data Structures | |
struct | lzma_microlzma_coder |
Functions | |
static lzma_ret | microlzma_decode (void *coder_ptr, const lzma_allocator *allocator, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, lzma_action action) |
static void | microlzma_decoder_end (void *coder_ptr, const lzma_allocator *allocator) |
static lzma_ret | microlzma_decoder_init (lzma_next_coder *next, const lzma_allocator *allocator, uint64_t comp_size, uint64_t uncomp_size, bool uncomp_size_is_exact, uint32_t dict_size) |
lzma_ret | lzma_microlzma_decoder (lzma_stream *strm, uint64_t comp_size, uint64_t uncomp_size, lzma_bool uncomp_size_is_exact, uint32_t dict_size) |
MicroLZMA decoder. More... | |
Decode MicroLZMA format.
lzma_ret lzma_microlzma_decoder | ( | lzma_stream * | strm, |
uint64_t | comp_size, | ||
uint64_t | uncomp_size, | ||
lzma_bool | uncomp_size_is_exact, | ||
uint32_t | dict_size | ||
) |
MicroLZMA decoder.
See lzma_microlzma_decoder() for more information.
The lzma_code() usage with this decoder is completely normal. The special behavior of lzma_code() applies to lzma_microlzma_encoder() only.
strm | Pointer to properly prepared lzma_stream |
comp_size | Compressed size of the MicroLZMA stream. The caller must somehow know this exactly. |
uncomp_size | Uncompressed size of the MicroLZMA stream. If the exact uncompressed size isn't known, this can be set to a value that is at most as big as the exact uncompressed size would be, but then the next argument uncomp_size_is_exact must be false. |
uncomp_size_is_exact | If true, uncomp_size must be exactly correct. This will improve error detection at the end of the stream. If the exact uncompressed size isn't known, this must be false. uncomp_size must still be at most as big as the exact uncompressed size is. Setting this to false when the exact size is known will work but error detection at the end of the stream will be weaker. |
dict_size | LZMA dictionary size that was used when compressing the data. It is OK to use a bigger value too but liblzma will then allocate more memory than would actually be required and error detection will be slightly worse. (Note that with the implementation in XZ Embedded it doesn't affect the memory usage if one specifies bigger dictionary than actually required.) |
References lzma_next_strm_init.