xz-analysis-mirror/src/xz/coder.h

65 lines
1.6 KiB
C
Raw Normal View History

2007-12-08 17:42:33 -05:00
///////////////////////////////////////////////////////////////////////////////
//
/// \file coder.h
2007-12-08 17:42:33 -05:00
/// \brief Compresses or uncompresses a file
//
// Author: Lasse Collin
2007-12-08 17:42:33 -05:00
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
2007-12-08 17:42:33 -05:00
//
///////////////////////////////////////////////////////////////////////////////
enum operation_mode {
MODE_COMPRESS,
MODE_DECOMPRESS,
MODE_TEST,
MODE_LIST,
};
// NOTE: The order of these is significant in suffix.c.
enum format_type {
FORMAT_AUTO,
FORMAT_XZ,
FORMAT_LZMA,
// HEADER_GZIP,
FORMAT_RAW,
};
/// Operation mode of the command line tool. This is set in args.c and read
/// in several files.
extern enum operation_mode opt_mode;
/// 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.
extern enum format_type opt_format;
2010-06-15 07:06:29 -04:00
/// If true, the compression settings are automatically adjusted down if
/// they exceed the memory usage limit.
extern bool opt_auto_adjust;
/// If true, stop after decoding the first stream.
extern bool opt_single_stream;
/// Set the integrity check type used when compressing
extern void coder_set_check(lzma_check check);
/// Set preset number
extern void coder_set_preset(size_t new_preset);
/// Enable extreme mode
extern void coder_set_extreme(void);
/// Add a filter to the custom filter chain
extern void coder_add_filter(lzma_vli id, void *options);
///
extern void coder_set_compression_settings(void);
2009-06-26 13:43:36 -04:00
/// Compress or decompress the given file
extern void coder_run(const char *filename);