block_encoder.c File Reference

Encodes .xz Blocks. More...

`#include "block_encoder.h"`
`#include "filter_encoder.h"`
`#include "check.h"`

## Data Structures

struct | lzma_block_coder

## Functions

static lzma_ret | block_encode (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_encoder_end (void *coder_ptr, const lzma_allocator *allocator)
static lzma_ret | block_encoder_update (void *coder_ptr, const lzma_allocator *allocator, const lzma_filter *filters lzma_attribute((__unused__)), const lzma_filter *reversed_filters)
lzma_ret | lzma_block_encoder_init (lzma_next_coder *next, const lzma_allocator *allocator, lzma_block *block)
lzma_ret | lzma_block_encoder (lzma_stream *strm, lzma_block *block)
| Initialize .xz Block encoder. More...

## Detailed Description

Encodes .xz Blocks.

## Function Documentation

## lzma_block_encoder()

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

Initialize .xz Block encoder.

Valid actions for lzma_code() are LZMA_RUN, LZMA_SYNC_FLUSH (only if the filter chain supports it), and LZMA_FINISH.

Returns
  - LZMA_OK: All good, continue with lzma_code().
  - LZMA_MEM_ERROR
  - LZMA_OPTIONS_ERROR
  - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID that is not supported by this build of liblzma. Initializing the encoder failed.
  - LZMA_PROG_ERROR

References lzma_next_strm_init.