/home/steven/tmp/wz/xz-utils/xz-utils-4.999.9beta+20100131/src/liblzma/common/block_header_decoder.c File Reference

Decodes Block Header from .xz files. More...

#include "common.h"
#include "check.h"

Functions

static void free_properties (lzma_block *block, lzma_allocator *allocator)
lzma_ret lzma_block_header_decode (lzma_block *block, lzma_allocator *allocator, const uint8_t *in)
 Decode Block Header.


Detailed Description

Decodes Block Header from .xz files.


Function Documentation

lzma_ret lzma_block_header_decode ( lzma_block block,
lzma_allocator allocator,
const uint8_t *  in 
)

Decode Block Header.

The size of the Block Header must have already been decoded with lzma_block_header_size_decode() macro and stored to block->header_size. block->filters must have been allocated, but not necessarily initialized. Possible existing filter options are _not_ freed.

Parameters:
block Destination for block options with header_size properly initialized.
allocator lzma_allocator for custom allocator functions. Set to NULL to use malloc() (and also free() if an error occurs).
in Beginning of the input buffer. This must be at least block->header_size bytes.
Returns:
- LZMA_OK: Decoding was successful. block->header_size bytes were read from the input buffer.
  • LZMA_OPTIONS_ERROR: The Block Header specifies some unsupported options such as unsupported filters.
  • LZMA_DATA_ERROR: Block Header is corrupt, for example, the CRC32 doesn't match.
  • LZMA_PROG_ERROR: Invalid arguments, for example block->header_size is invalid or block->filters is NULL.

References lzma_block_header_size_decode, lzma_block_unpadded_size(), LZMA_CHECK_ID_MAX, lzma_crc32(), LZMA_DATA_ERROR, lzma_filter_flags_decode(), LZMA_FILTERS_MAX, LZMA_OK, LZMA_OPTIONS_ERROR, LZMA_PROG_ERROR, lzma_vli_decode(), LZMA_VLI_UNKNOWN, and return_if_error.


Generated on Mon Feb 15 15:28:22 2010 for XZ Utils by  doxygen 1.5.6