]> icculus.org git repositories - icculus/xz.git/blob - src/liblzma/common/easy_preset.h
Added lzma_easy_buffer_encode(). Splitted easy.c into small
[icculus/xz.git] / src / liblzma / common / easy_preset.h
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file       easy_preset.h
4 /// \brief      Preset handling for easy encoder and decoder
5 //
6 //  Copyright (C) 2009 Lasse Collin
7 //
8 //  This library 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 library 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 #include "common.h"
21
22
23 typedef struct {
24         /// We need to keep the filters array available in case
25         /// LZMA_FULL_FLUSH is used.
26         lzma_filter filters[LZMA_FILTERS_MAX + 1];
27
28         /// Options for LZMA2
29         lzma_options_lzma opt_lzma;
30
31         // Options for more filters can be added later, so this struct
32         // is not ready to be put into the public API.
33
34 } lzma_options_easy;
35
36
37 /// Set *easy to the settings given by the preset. Returns true on error,
38 /// false on success.
39 extern bool lzma_easy_preset(lzma_options_easy *easy, uint32_t preset);