brintos

brintos / linux-shallow public Read only

0
0
Text · 1.0 KiB · 784ab33 Raw
40 lines · c
1/* infutil.h -- types and macros common to blocks and codes2 * Copyright (C) 1995-1998 Mark Adler3 * For conditions of distribution and use, see copyright notice in zlib.h 4 */5 6/* WARNING: this file should *not* be used by applications. It is7   part of the implementation of the compression library and is8   subject to change. Applications should only use zlib.h.9 */10 11#ifndef _INFUTIL_H12#define _INFUTIL_H13 14#include <linux/zlib.h>15#ifdef CONFIG_ZLIB_DFLTCC16#include "../zlib_dfltcc/dfltcc.h"17#include <asm/page.h>18#endif19 20/* memory allocation for inflation */21 22struct inflate_workspace {23	struct inflate_state inflate_state;24#ifdef CONFIG_ZLIB_DFLTCC25	struct dfltcc_state dfltcc_state;26	unsigned char working_window[(1 << MAX_WBITS) + PAGE_SIZE];27#else28	unsigned char working_window[(1 << MAX_WBITS)];29#endif30};31 32#ifdef CONFIG_ZLIB_DFLTCC33/* dfltcc_state must be doubleword aligned for DFLTCC call */34static_assert(offsetof(struct inflate_workspace, dfltcc_state) % 8 == 0);35#endif36 37#define WS(strm) ((struct inflate_workspace *)(strm->workspace))38 39#endif40