]> icculus.org git repositories - icculus/xz.git/blob - src/liblzma/api/lzma.h
Imported to git.
[icculus/xz.git] / src / liblzma / api / lzma.h
1 /**
2  * \file        lzma.h
3  * \brief       The public API of liblzma
4  *
5  * liblzma is a LZMA compression library with a zlib-like API.
6  * liblzma is based on LZMA SDK found from http://7-zip.org/sdk.html.
7  *
8  * \author      Copyright (C) 1999-2006 Igor Pavlov
9  * \author      Copyright (C) 2007 Lasse Collin
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  */
21
22 #ifndef LZMA_H
23 #define LZMA_H
24
25 /********************
26  * External headers *
27  ********************/
28
29 /* size_t */
30 #include <sys/types.h>
31
32 /* NULL */
33 #include <stddef.h>
34
35 /* uint8_t, uint32_t, uint64_t, UINT32_C, UINT64_C, UINT64_MAX. */
36 #include <inttypes.h>
37
38
39 /******************
40  * GCC extensions *
41  ******************/
42
43 /*
44  * GCC extensions are used conditionally in the public API. It doesn't
45  * break anything if these are sometimes enabled and sometimes not, only
46  * affects warnings and optimizations.
47  */
48 #if defined(__GNUC__) && __GNUC__ >= 3
49 #       ifndef lzma_attribute
50 #               define lzma_attribute(attr) __attribute__(attr)
51 #       endif
52 #       ifndef lzma_restrict
53 #               define lzma_restrict __restrict__
54 #       endif
55 #else
56 #       ifndef lzma_attribute
57 #               define lzma_attribute(attr)
58 #       endif
59 #       ifndef lzma_restrict
60 #               define lzma_restrict
61 #       endif
62 #endif
63
64
65 /**************
66  * Subheaders *
67  **************/
68
69 #ifdef __cplusplus
70 extern "C" {
71 #endif
72
73 /*
74  * Subheaders check that this is defined. It is to prevent including
75  * them directly from applications.
76  */
77 #define LZMA_H_INTERNAL 1
78
79 /* Basic features */
80 #include "lzma/init.h"
81 #include "lzma/base.h"
82 #include "lzma/vli.h"
83 #include "lzma/filter.h"
84 #include "lzma/check.h"
85
86 /* Filters */
87 #include "lzma/copy.h"
88 #include "lzma/subblock.h"
89 #include "lzma/simple.h"
90 #include "lzma/delta.h"
91 #include "lzma/lzma.h"
92
93 /* Container formats and Metadata */
94 #include "lzma/block.h"
95 #include "lzma/index.h"
96 #include "lzma/extra.h"
97 #include "lzma/metadata.h"
98 #include "lzma/stream.h"
99 #include "lzma/alone.h"
100 #include "lzma/raw.h"
101 #include "lzma/auto.h"
102
103 /* Advanced features */
104 #include "lzma/info.h"
105 #include "lzma/alignment.h"
106 #include "lzma/stream_flags.h"
107 #include "lzma/memlimit.h"
108
109 /* Version number */
110 #include "lzma/version.h"
111
112 /*
113  * All subheaders included. Undefine LZMA_H_INTERNAL to prevent applications
114  * re-including the subheaders.
115  */
116 #undef LZMA_H_INTERNAL
117
118 #ifdef __cplusplus
119 }
120 #endif
121
122 #endif /* ifndef LZMA_H */