src/liblzma/lzma/lzma_encoder_presets.c File Reference

Encoder presets. More...

#include "common.h"

Functions

 LZMA_API (lzma_bool)
 Test if the given Check ID is supported.


Detailed Description

Encoder presets.


Function Documentation

LZMA_API ( lzma_bool   ) 

Test if the given Check ID is supported.

Test if given match finder is supported.

Test if the given Filter ID is supported for encoding.

Set a compression preset to lzma_options_lzma structure.

Test if given compression mode is supported.

Compare if two Index lists are identical.

Locate a Record.

Test if the given Filter ID is supported for decoding.

Returns true if the given Check ID is supported by this liblzma build. Otherwise false is returned. It is safe to call this with a value that is not in the range [0, 15]; in that case the return value is always false.

You can assume that LZMA_CHECK_NONE and LZMA_CHECK_CRC32 are always supported (even if liblzma is built with limited features).

Returns true if the give Filter ID is supported for decoding by this liblzma build. Otherwise false is returned.

When the Index is available, it is possible to do random-access reading with granularity of Block size.

Parameters:
i Pointer to lzma_index structure
record Pointer to a structure to hold the search results
target Uncompressed target offset which the caller would like to locate from the Stream
If the target is smaller than the uncompressed size of the Stream (can be checked with lzma_index_uncompressed_size()):
  • Information about the Record containing the requested uncompressed offset is stored into *record.
  • Read offset will be adjusted so that calling lzma_index_read() can be used to read subsequent Records.
  • This function returns false.

If target is greater than the uncompressed size of the Stream, *record and the read position are not modified, and this function returns true.

Returns:
True if *a and *b are equal, false otherwise.
Returns true if the given compression mode is supported by this liblzma build. Otherwise false is returned. It is safe to call this with a value that isn't listed in lzma_mode enumeration; the return value will be false.

There is no way to list which modes are available in this particular liblzma version and build. It would be useless, because a new compression mode, which the application developer wasn't aware, could require giving additional options to the encoder that the older modes don't need.

0 is the fastest and 9 is the slowest. These match the switches -0 .. -9 of the xz command line tool. In addition, it is possible to bitwise-or flags to the preset. Currently only LZMA_PRESET_EXTREME is supported. The flags are defined in container.h, because the flags are used also with lzma_easy_encoder().

The preset values are subject to changes between liblzma versions.

This function is available only if LZMA1 or LZMA2 encoder has been enabled when building liblzma.

Test if the given Check ID is supported.

Compare if two Index lists are identical.

Locate a Record.

When the Index is available, it is possible to do random-access reading with granularity of Block size.

Parameters:
i Pointer to lzma_index structure
record Pointer to a structure to hold the search results
target Uncompressed target offset which the caller would like to locate from the Stream
If the target is smaller than the uncompressed size of the Stream (can be checked with lzma_index_uncompressed_size()):
  • Information about the Record containing the requested uncompressed offset is stored into *record.
  • Read offset will be adjusted so that calling lzma_index_read() can be used to read subsequent Records.
  • This function returns false.

If target is greater than the uncompressed size of the Stream, *record and the read position are not modified, and this function returns true.

Returns:
True if *a and *b are equal, false otherwise.

References init_current(), LZMA_PRESET_EXTREME, LZMA_PRESET_LEVEL_MASK, next_group(), previous_group(), and set_info().


Generated on Wed May 25 10:35:47 2011 for XZ Utils by  doxygen 1.5.5