XZ Utils 5.1.0alpha
Data Structures | Functions
liblzma/common/stream_decoder.c File Reference

Decodes .xz Streams. More...

#include "stream_decoder.h"
#include "block_decoder.h"

Data Structures

struct  lzma_coder_s

Functions

static lzma_ret stream_decoder_reset (lzma_coder *coder, lzma_allocator *allocator)
static lzma_ret stream_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, size_t *restrict out_pos, size_t out_size, lzma_action action)
static void stream_decoder_end (lzma_coder *coder, lzma_allocator *allocator)
static lzma_check stream_decoder_get_check (const lzma_coder *coder)
static lzma_ret stream_decoder_memconfig (lzma_coder *coder, uint64_t *memusage, uint64_t *old_memlimit, uint64_t new_memlimit)
lzma_ret lzma_stream_decoder_init (lzma_next_coder *next, lzma_allocator *allocator, uint64_t memlimit, uint32_t flags)
lzma_ret lzma_stream_decoder (lzma_stream *strm, uint64_t memlimit, uint32_t flags)
 Initialize .xz Stream decoder.

Detailed Description

Decodes .xz Streams.


Function Documentation

lzma_ret lzma_stream_decoder ( lzma_stream strm,
uint64_t  memlimit,
uint32_t  flags 
)

Initialize .xz Stream decoder.

Parameters:
strmPointer to properly prepared lzma_stream
memlimitMemory usage limit as bytes. Use UINT64_MAX to effectively disable the limiter.
flagsBitwise-or of zero or more of the decoder flags: LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, LZMA_TELL_ANY_CHECK, LZMA_CONCATENATED
Returns:
- LZMA_OK: Initialization was successful.
  • LZMA_MEM_ERROR: Cannot allocate memory.
  • LZMA_OPTIONS_ERROR: Unsupported flags
  • LZMA_PROG_ERROR

References LZMA_FINISH, lzma_next_strm_init, LZMA_OK, and LZMA_RUN.

Referenced by coder_init().