0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef _INFUTIL_H
0012 #define _INFUTIL_H
0013
0014 #include <linux/zlib.h>
0015 #ifdef CONFIG_ZLIB_DFLTCC
0016 #include "../zlib_dfltcc/dfltcc.h"
0017 #include <asm/page.h>
0018 #endif
0019
0020
0021
0022 struct inflate_workspace {
0023 struct inflate_state inflate_state;
0024 #ifdef CONFIG_ZLIB_DFLTCC
0025 struct dfltcc_state dfltcc_state;
0026 unsigned char working_window[(1 << MAX_WBITS) + PAGE_SIZE];
0027 #else
0028 unsigned char working_window[(1 << MAX_WBITS)];
0029 #endif
0030 };
0031
0032 #ifdef CONFIG_ZLIB_DFLTCC
0033
0034 static_assert(offsetof(struct inflate_workspace, dfltcc_state) % 8 == 0);
0035 #endif
0036
0037 #define WS(strm) ((struct inflate_workspace *)(strm->workspace))
0038
0039 #endif