1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief Compresses or uncompresses a file
6 // Author: Lasse Collin
8 // This file has been put into the public domain.
9 // You can do whatever you want with this file.
11 ///////////////////////////////////////////////////////////////////////////////
21 // NOTE: The order of these is significant in suffix.c.
31 /// Operation mode of the command line tool. This is set in args.c and read
33 extern enum operation_mode opt_mode;
35 /// File format to use when encoding or what format(s) to accept when
36 /// decoding. This is a global because it's needed also in suffix.c.
37 /// This is set in args.c.
38 extern enum format_type opt_format;
40 /// If true, the compression settings are automatically adjusted down if
41 /// they exceed the memory usage limit.
42 extern bool opt_auto_adjust;
44 /// If true, stop after decoding the first stream.
45 extern bool opt_single_stream;
47 /// If non-zero, start a new .xz Block after every opt_block_size bytes
48 /// of input. This has an effect only when compressing to the .xz format.
49 extern uint64_t opt_block_size;
51 /// This is non-NULL if --block-list was used. This contains the Block sizes
52 /// as an array that is terminated with 0.
53 extern uint64_t *opt_block_list;
55 /// Set the integrity check type used when compressing
56 extern void coder_set_check(lzma_check check);
59 extern void coder_set_preset(uint32_t new_preset);
61 /// Enable extreme mode
62 extern void coder_set_extreme(void);
64 /// Add a filter to the custom filter chain
65 extern void coder_add_filter(lzma_vli id, void *options);
68 extern void coder_set_compression_settings(void);
70 /// Compress or decompress the given file
71 extern void coder_run(const char *filename);
74 /// Free the memory allocated for the coder and kill the worker threads.
75 extern void coder_free(void);