Added lzma_easy_buffer_encode(). Splitted easy.c into small
[xz/debian.git] / src / liblzma / common / easy_preset.h
blobe8671fe2485a0689d83741da9fd3dd59f9f7a7d6
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.
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.
18 ///////////////////////////////////////////////////////////////////////////////
20 #include "common.h"
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];
28 /// Options for LZMA2
29 lzma_options_lzma opt_lzma;
31 // Options for more filters can be added later, so this struct
32 // is not ready to be put into the public API.
34 } lzma_options_easy;
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);