Functions

/tmp/buildd/xz-utils-5.0.0/src/liblzma/common/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.
lzma_ret lzma_stream_footer_encode (const lzma_stream_flags *options, uint8_t *out)
 Encode Stream Footer.

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:
options Stream Header options to be encoded. options->backward_size is ignored and doesn't need to be initialized.
out Beginning 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_STREAM_FLAGS_SIZE, and LZMA_STREAM_HEADER_SIZE.

Referenced by lzma_stream_buffer_encode().

lzma_ret lzma_stream_footer_encode ( const lzma_stream_flags options,
uint8_t *  out 
)

Encode Stream Footer.

Parameters:
options Stream Footer options to be encoded.
out Beginning 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_STREAM_FLAGS_SIZE, and LZMA_STREAM_HEADER_SIZE.

Referenced by lzma_stream_buffer_encode().