]> icculus.org git repositories - icculus/xz.git/blob - src/xz/process.h
Renamed lzma to xz and lzmadec to xzdec. We create symlinks
[icculus/xz.git] / src / xz / process.h
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       process.c
4 /// \brief      Compresses or uncompresses a file
5 //
6 //  Copyright (C) 2007 Lasse Collin
7 //
8 //  This program is free software; you can redistribute it and/or
9 //  modify it under the terms of the GNU Lesser General Public
10 //  License as published by the Free Software Foundation; either
11 //  version 2.1 of the License, or (at your option) any later version.
12 //
13 //  This program is distributed in the hope that it will be useful,
14 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 //  Lesser General Public License for more details.
17 //
18 ///////////////////////////////////////////////////////////////////////////////
19
20 #ifndef PROCESS_H
21 #define PROCESS_H
22
23 #include "private.h"
24
25
26 enum operation_mode {
27         MODE_COMPRESS,
28         MODE_DECOMPRESS,
29         MODE_TEST,
30         MODE_LIST,
31 };
32
33
34 // NOTE: The order of these is significant in suffix.c.
35 enum format_type {
36         FORMAT_AUTO,
37         FORMAT_XZ,
38         FORMAT_LZMA,
39         // HEADER_GZIP,
40         FORMAT_RAW,
41 };
42
43
44 /// Operation mode of the command line tool. This is set in args.c and read
45 /// in several files.
46 extern enum operation_mode opt_mode;
47
48 /// File format to use when encoding or what format(s) to accept when
49 /// decoding. This is a global because it's needed also in suffix.c.
50 /// This is set in args.c.
51 extern enum format_type opt_format;
52
53
54 /// Set the integrity check type used when compressing
55 extern void coder_set_check(lzma_check check);
56
57 /// Set preset number
58 extern void coder_set_preset(size_t new_preset);
59
60 /// Add a filter to the custom filter chain
61 extern void coder_add_filter(lzma_vli id, void *options);
62
63 ///
64 extern void coder_set_compression_settings(void);
65
66 extern void process_init(void);
67
68 extern void process_file(const char *filename);
69
70 #endif