XZ Utils  5.1.0alpha
Data Structures | Functions
stream_encoder.c File Reference

Encodes .xz Streams. More...

#include "block_encoder.h"
#include "index_encoder.h"

Data Structures

struct  lzma_coder_s
 

Functions

static lzma_ret block_encoder_init (lzma_coder *coder, lzma_allocator *allocator)
 
static lzma_ret stream_encode (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_encoder_end (lzma_coder *coder, lzma_allocator *allocator)
 
static lzma_ret stream_encoder_update (lzma_coder *coder, lzma_allocator *allocator, const lzma_filter *filters, const lzma_filter *reversed_filters)
 
static lzma_ret stream_encoder_init (lzma_next_coder *next, lzma_allocator *allocator, const lzma_filter *filters, lzma_check check)
 
lzma_ret lzma_stream_encoder (lzma_stream *strm, const lzma_filter *filters, lzma_check check)
 Initialize .xz Stream encoder using a custom filter chain. More...
 

Detailed Description

Encodes .xz Streams.

Function Documentation

lzma_ret lzma_stream_encoder ( lzma_stream strm,
const lzma_filter filters,
lzma_check  check 
)

Initialize .xz Stream encoder using a custom filter chain.

Parameters
strmPointer to properly prepared lzma_stream
filtersArray of filters. This must be terminated with filters[n].id = LZMA_VLI_UNKNOWN. See filter.h for more information.
checkType of the integrity check to calculate from uncompressed data.
Returns
- LZMA_OK: Initialization was successful.
  • LZMA_MEM_ERROR
  • LZMA_UNSUPPORTED_CHECK
  • LZMA_OPTIONS_ERROR
  • LZMA_PROG_ERROR

References LZMA_FINISH, LZMA_FULL_FLUSH, lzma_next_strm_init, LZMA_OK, LZMA_RUN, and LZMA_SYNC_FLUSH.

Referenced by coder_init(), and lzma_easy_encoder().