14 # include <linux/xz.h> 15 # include <linux/kernel.h> 16 # include <asm/unaligned.h> 19 # include <linux/slab.h> 20 # include <linux/vmalloc.h> 21 # include <linux/string.h> 22 # ifdef CONFIG_XZ_DEC_X86 25 # ifdef CONFIG_XZ_DEC_POWERPC 26 # define XZ_DEC_POWERPC 28 # ifdef CONFIG_XZ_DEC_IA64 31 # ifdef CONFIG_XZ_DEC_ARM 34 # ifdef CONFIG_XZ_DEC_ARMTHUMB 35 # define XZ_DEC_ARMTHUMB 37 # ifdef CONFIG_XZ_DEC_SPARC 40 # define memeq(a, b, size) (memcmp(a, b, size) == 0) 41 # define memzero(buf, size) memset(buf, 0, size) 43 # define get_le32(p) le32_to_cpup((const uint32_t *)(p)) 50 # include "xz_config.h" 54 #if !defined(XZ_DEC_SINGLE) && !defined(XZ_DEC_PREALLOC) \ 55 && !defined(XZ_DEC_DYNALLOC) 56 # define XZ_DEC_SINGLE 57 # define XZ_DEC_PREALLOC 58 # define XZ_DEC_DYNALLOC 67 # define DEC_IS_SINGLE(mode) ((mode) == XZ_SINGLE) 69 # define DEC_IS_SINGLE(mode) (false) 72 #ifdef XZ_DEC_PREALLOC 73 # define DEC_IS_PREALLOC(mode) ((mode) == XZ_PREALLOC) 75 # define DEC_IS_PREALLOC(mode) (false) 78 #ifdef XZ_DEC_DYNALLOC 79 # define DEC_IS_DYNALLOC(mode) ((mode) == XZ_DYNALLOC) 81 # define DEC_IS_DYNALLOC(mode) (false) 84 #if !defined(XZ_DEC_SINGLE) 85 # define DEC_IS_MULTI(mode) (true) 86 #elif defined(XZ_DEC_PREALLOC) || defined(XZ_DEC_DYNALLOC) 87 # define DEC_IS_MULTI(mode) ((mode) != XZ_SINGLE) 89 # define DEC_IS_MULTI(mode) (false) 97 # if defined(XZ_DEC_X86) || defined(XZ_DEC_POWERPC) \ 98 || defined(XZ_DEC_IA64) || defined(XZ_DEC_ARM) \ 99 || defined(XZ_DEC_ARM) || defined(XZ_DEC_ARMTHUMB) \ 100 || defined(XZ_DEC_SPARC) 109 XZ_EXTERN
struct xz_dec_lzma2 *xz_dec_lzma2_create(
enum xz_mode mode,
118 XZ_EXTERN
enum xz_ret xz_dec_lzma2_reset(
struct xz_dec_lzma2 *s,
122 XZ_EXTERN
enum xz_ret xz_dec_lzma2_run(
struct xz_dec_lzma2 *s,
126 XZ_EXTERN
void xz_dec_lzma2_end(
struct xz_dec_lzma2 *s);
133 XZ_EXTERN
struct xz_dec_bcj *xz_dec_bcj_create(
bool single_call);
141 XZ_EXTERN
enum xz_ret xz_dec_bcj_reset(
struct xz_dec_bcj *s, uint8_t
id);
148 XZ_EXTERN
enum xz_ret xz_dec_bcj_run(
struct xz_dec_bcj *s,
153 #define xz_dec_bcj_end(s) kfree(s)
Definition: xz_dec_lzma2.c:253