xref: /freebsd/contrib/xz/src/liblzma/common/easy_preset.h (revision 6549718b70f0e660a15685369afb4f9caf2215ce)
1 // SPDX-License-Identifier: 0BSD
2 
3 ///////////////////////////////////////////////////////////////////////////////
4 //
5 /// \file       easy_preset.h
6 /// \brief      Preset handling for easy encoder and decoder
7 //
8 //  Author:     Lasse Collin
9 //
10 ///////////////////////////////////////////////////////////////////////////////
11 
12 #ifndef LZMA_EASY_PRESET_H
13 #define LZMA_EASY_PRESET_H
14 
15 #include "common.h"
16 
17 
18 typedef struct {
19 	/// We need to keep the filters array available in case
20 	/// LZMA_FULL_FLUSH is used.
21 	lzma_filter filters[LZMA_FILTERS_MAX + 1];
22 
23 	/// Options for LZMA2
24 	lzma_options_lzma opt_lzma;
25 
26 	// Options for more filters can be added later, so this struct
27 	// is not ready to be put into the public API.
28 
29 } lzma_options_easy;
30 
31 
32 /// Set *easy to the settings given by the preset. Returns true on error,
33 /// false on success.
34 extern bool lzma_easy_preset(lzma_options_easy *easy, uint32_t preset);
35 
36 #endif
37