XZ Utils  5.2.2
Functions
stream_flags_encoder.c File Reference

Encodes Stream Header and Stream Footer for .xz files. More...

#include "stream_flags_common.h"

Functions

static bool stream_flags_encode (const lzma_stream_flags *options, uint8_t *out)
 
lzma_ret lzma_stream_header_encode (const lzma_stream_flags *options, uint8_t *out)
 Encode Stream Header. More...
 
lzma_ret lzma_stream_footer_encode (const lzma_stream_flags *options, uint8_t *out)
 Encode Stream Footer. More...
 

Detailed Description

Encodes Stream Header and Stream Footer for .xz files.

Function Documentation

lzma_ret lzma_stream_header_encode ( const lzma_stream_flags options,
uint8_t *  out 
)

Encode Stream Header.

Parameters
optionsStream Header options to be encoded. options->backward_size is ignored and doesn't need to be initialized.
outBeginning of the output buffer of LZMA_STREAM_HEADER_SIZE bytes.
Returns
- LZMA_OK: Encoding was successful.
  • LZMA_OPTIONS_ERROR: options->version is not supported by this liblzma version.
  • LZMA_PROG_ERROR: Invalid options.

References lzma_crc32(), LZMA_OK, LZMA_OPTIONS_ERROR, LZMA_PROG_ERROR, LZMA_STREAM_FLAGS_SIZE, and LZMA_STREAM_HEADER_SIZE.

Referenced by get_options(), and lzma_stream_buffer_encode().

lzma_ret lzma_stream_footer_encode ( const lzma_stream_flags options,
uint8_t *  out 
)

Encode Stream Footer.

Parameters
optionsStream Footer options to be encoded.
outBeginning of the output buffer of LZMA_STREAM_HEADER_SIZE bytes.
Returns
- LZMA_OK: Encoding was successful.
  • LZMA_OPTIONS_ERROR: options->version is not supported by this liblzma version.
  • LZMA_PROG_ERROR: Invalid options.

References lzma_crc32(), LZMA_OK, LZMA_OPTIONS_ERROR, LZMA_PROG_ERROR, LZMA_STREAM_FLAGS_SIZE, and LZMA_STREAM_HEADER_SIZE.

Referenced by lzma_stream_buffer_encode(), and wait_for_work().