block_decoder.c File Reference

Decodes .xz Blocks. More...

`#include "block_decoder.h"`
`#include "filter_decoder.h"`
`#include "check.h"`

## Data Structures

struct | lzma_block_coder

## Functions

static bool | update_size (lzma_vli *size, lzma_vli add, lzma_vli limit)
static bool | is_size_valid (lzma_vli size, lzma_vli reference)
static lzma_ret | block_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 | block_decoder_end (void *coder_ptr, const lzma_allocator *allocator)
lzma_ret | lzma_block_decoder_init (lzma_next_coder *next, const lzma_allocator *allocator, lzma_block *block)
lzma_ret | lzma_block_decoder (lzma_stream *strm, lzma_block *block)
| Initialize .xz Block decoder. More...

## Detailed Description

Decodes .xz Blocks.

## Function Documentation

## lzma_block_decoder()

lzma_ret lzma_block_decoder | ( | lzma_stream * | strm,
|  | lzma_block * | block
| ) |  |

Initialize .xz Block decoder.

Valid actions for lzma_code() are LZMA_RUN and LZMA_FINISH. Using LZMA_FINISH is not required. It is supported only for convenience.

Returns
  - LZMA_OK: All good, continue with lzma_code().
  - LZMA_UNSUPPORTED_CHECK: Initialization was successful, but the given Check ID is not supported, thus Check will be ignored.
  - LZMA_PROG_ERROR
  - LZMA_MEM_ERROR

References lzma_next_strm_init.