Decodes the Index field. More...
#include "index.h"#include "check.h"Data Structures | |
| struct | lzma_coder_s |
Functions | |
| static lzma_ret | index_decode (lzma_coder *coder, lzma_allocator *allocator, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out lzma_attribute((unused)), size_t *restrict out_pos lzma_attribute((unused)), size_t out_size lzma_attribute((unused)), lzma_action action lzma_attribute((unused))) |
| static void | index_decoder_end (lzma_coder *coder, lzma_allocator *allocator) |
| static lzma_ret | index_decoder_memconfig (lzma_coder *coder, uint64_t *memusage, uint64_t *old_memlimit, uint64_t new_memlimit) |
| static lzma_ret | index_decoder_reset (lzma_coder *coder, lzma_allocator *allocator, lzma_index **i, uint64_t memlimit) |
| static lzma_ret | index_decoder_init (lzma_next_coder *next, lzma_allocator *allocator, lzma_index **i, uint64_t memlimit) |
| lzma_ret | lzma_index_decoder (lzma_stream *strm, lzma_index **i, uint64_t memlimit) |
| Initialize .xz Index decoder. | |
| lzma_ret | lzma_index_buffer_decode (lzma_index **i, uint64_t *memlimit, lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size) |
| Single-call .xz Index decoder. | |
Decodes the Index field.
| lzma_ret lzma_index_decoder | ( | lzma_stream * | strm, | |
| lzma_index ** | i, | |||
| uint64_t | memlimit | |||
| ) |
Initialize .xz Index decoder.
| strm | Pointer to properly prepared lzma_stream | |
| i | Pointer to a pointer that will be made to point to the final decoded Index once lzma_code() has returned LZMA_STREAM_END. That is, lzma_index_decoder() always takes care of allocating a new lzma_index structure, and *i doesn't need to be initialized by the caller. | |
| memlimit | How much memory the resulting Index is allowed to require. |
The only valid action value for lzma_code() is LZMA_RUN.
References lzma_next_strm_init, LZMA_OK, and LZMA_RUN.
| lzma_ret lzma_index_buffer_decode | ( | lzma_index ** | i, | |
| uint64_t * | memlimit, | |||
| lzma_allocator * | allocator, | |||
| const uint8_t * | in, | |||
| size_t * | in_pos, | |||
| size_t | in_size | |||
| ) |
Single-call .xz Index decoder.
| i | Pointer to a pointer that will be made to point to the final decoded Index if decoding is successful. That is, lzma_index_buffer_decode() always takes care of allocating a new lzma_index structure, and *i doesn't need to be initialized by the caller. | |
| memlimit | Pointer to how much memory the resulting Index is allowed to require. The value pointed by this pointer is modified if and only if LZMA_MEMLIMIT_ERROR is returned. | |
| allocator | Pointer to lzma_allocator, or NULL to use malloc() | |
| in | Beginning of the input buffer | |
| in_pos | The next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds. | |
| in_size | Size of the input buffer; the first byte that won't be read is in[in_size]. |
References lzma_coder_s::count, LZMA_DATA_ERROR, lzma_index_end(), lzma_index_memusage(), LZMA_OK, LZMA_PROG_ERROR, LZMA_RUN, LZMA_STREAM_END, and return_if_error.
1.6.1