XZ Utils  5.2.5
Data Structures | Functions
stream_encoder.c File Reference

Encodes .xz Streams. More...

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

Data Structures

struct  lzma_stream_coder
 

Functions

static lzma_ret block_encoder_init (lzma_stream_coder *coder, const lzma_allocator *allocator)
 
static lzma_ret stream_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 stream_encoder_end (void *coder_ptr, const lzma_allocator *allocator)
 
static lzma_ret stream_encoder_update (void *coder_ptr, const lzma_allocator *allocator, const lzma_filter *filters, const lzma_filter *reversed_filters)
 
static lzma_ret stream_encoder_init (lzma_next_coder *next, const 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_stream_encoder()

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_next_strm_init.

Referenced by lzma_easy_encoder().