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.
26 #ifdef HAVE_LZIP_DECODER
33 /// Operation mode of the command line tool. This is set in args.c and read
35 extern enum operation_mode opt_mode;
37 /// File format to use when encoding or what format(s) to accept when
38 /// decoding. This is a global because it's needed also in suffix.c.
39 /// This is set in args.c.
40 extern enum format_type opt_format;
42 /// If true, the compression settings are automatically adjusted down if
43 /// they exceed the memory usage limit.
44 extern bool opt_auto_adjust;
46 /// If true, stop after decoding the first stream.
47 extern bool opt_single_stream;
49 /// If non-zero, start a new .xz Block after every opt_block_size bytes
50 /// of input. This has an effect only when compressing to the .xz format.
51 extern uint64_t opt_block_size;
53 /// This is non-NULL if --block-list was used. This contains the Block sizes
54 /// as an array that is terminated with 0.
55 extern uint64_t *opt_block_list;
57 /// Set the integrity check type used when compressing
58 extern void coder_set_check(lzma_check check);
61 extern void coder_set_preset(uint32_t new_preset);
63 /// Enable extreme mode
64 extern void coder_set_extreme(void);
66 /// Add a filter to the custom filter chain
67 extern void coder_add_filter(lzma_vli id, void *options);
70 extern void coder_set_compression_settings(void);
72 /// Compress or decompress the given file
73 extern void coder_run(const char *filename);
76 /// Free the memory allocated for the coder and kill the worker threads.
77 extern void coder_free(void);