src/xz/process.c File Reference

Compresses or uncompresses a file. More...

#include "private.h"

Functions

void coder_set_check (lzma_check new_check)
 Set the integrity check type used when compressing.
void coder_set_preset (size_t new_preset)
 Set preset number.
void coder_set_extreme (void)
 Enable extreme mode.
void coder_add_filter (lzma_vli id, void *options)
 Add a filter to the custom filter chain.
static void lzma_attribute ((noreturn))
void coder_set_compression_settings (void)
static bool coder_init (void)
static bool coder_run (file_pair *pair)
void process_file (const char *filename)

Variables

enum operation_mode opt_mode = MODE_COMPRESS
enum format_type opt_format = FORMAT_AUTO
static lzma_stream strm = LZMA_STREAM_INIT
 Stream used to communicate with liblzma.
static lzma_filter filters [LZMA_FILTERS_MAX+1]
 Filters needed for all encoding all formats, and also decoding in raw data.
static size_t filters_count = 0
 Number of filters. Zero indicates that we are using a preset.
static size_t preset_number = 6
 Number of the preset (0-9).
static bool auto_adjust = true
static bool preset_default = true
static bool preset_extreme = false
static lzma_check check = LZMA_CHECK_CRC64
 Integrity check type.


Detailed Description

Compresses or uncompresses a file.


Function Documentation

void coder_set_check ( lzma_check  new_check  ) 

Set the integrity check type used when compressing.

void coder_set_preset ( size_t  new_preset  ) 

Set preset number.

References preset_default, and preset_number.

void coder_set_extreme ( void   ) 

Enable extreme mode.

References preset_extreme.

void coder_add_filter ( lzma_vli  id,
void *  options 
)

Add a filter to the custom filter chain.

References filters_count, lzma_filter::id, LZMA_FILTERS_MAX, and lzma_filter::options.


Variable Documentation

enum operation_mode opt_mode = MODE_COMPRESS

Operation mode of the command line tool. This is set in args.c and read in several files.

Referenced by message_progress_end(), and suffix_get_dest_name().

enum format_type opt_format = FORMAT_AUTO

File format to use when encoding or what format(s) to accept when decoding. This is a global because it's needed also in suffix.c. This is set in args.c.

Referenced by compressed_name(), and uncompressed_name().

lzma_stream strm = LZMA_STREAM_INIT [static]

Stream used to communicate with liblzma.

lzma_filter filters[LZMA_FILTERS_MAX+1] [static]

Filters needed for all encoding all formats, and also decoding in raw data.

size_t filters_count = 0 [static]

Number of filters. Zero indicates that we are using a preset.

Referenced by coder_add_filter().

size_t preset_number = 6 [static]

Number of the preset (0-9).

Referenced by coder_set_preset().

bool auto_adjust = true [static]

True if we should auto-adjust the compression settings to use less memory if memory usage limit is too low for the original settings.

bool preset_default = true [static]

Indicate if no preset has been explicitly given. In that case, if we need to auto-adjust for lower memory usage, we won't print a warning.

Referenced by coder_set_preset().

bool preset_extreme = false [static]

If a preset is used (no custom filter chain) and preset_extreme is true, a significantly slower compression is used to achieve slightly better compression ratio.

Referenced by coder_set_extreme().

lzma_check check = LZMA_CHECK_CRC64 [static]

Integrity check type.


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