Data Structures | Functions

/tmp/buildd/xz-utils-5.0.0/src/liblzma/common/stream_encoder.c File Reference

Encodes .xz Streams. More...

#include "stream_encoder.h"
#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)
lzma_ret lzma_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.

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:
strm Pointer to properly prepared lzma_stream
filters Array of filters. This must be terminated with filters[n].id = LZMA_VLI_UNKNOWN. See filter.h for more information.
check Type of the integrity check to calculate from uncompressed data.
Returns:
- LZMA_OK: Initialization was successful.
  • LZMA_MEM_ERROR
  • LZMA_OPTIONS_ERROR
  • LZMA_PROG_ERROR

References lzma_next_strm_init.

Referenced by coder_init(), and lzma_easy_encoder().