2005-04-16 22:20:36 +00:00
|
|
|
/* infutil.h -- types and macros common to blocks and codes
|
|
|
|
* Copyright (C) 1995-1998 Mark Adler
|
|
|
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* WARNING: this file should *not* be used by applications. It is
|
|
|
|
part of the implementation of the compression library and is
|
|
|
|
subject to change. Applications should only use zlib.h.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INFUTIL_H
|
|
|
|
#define _INFUTIL_H
|
|
|
|
|
2006-06-22 21:47:34 +00:00
|
|
|
#include <linux/zlib.h>
|
2020-01-31 06:16:23 +00:00
|
|
|
#ifdef CONFIG_ZLIB_DFLTCC
|
|
|
|
#include "../zlib_dfltcc/dfltcc.h"
|
|
|
|
#include <asm/page.h>
|
|
|
|
#endif
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/* memory allocation for inflation */
|
|
|
|
|
|
|
|
struct inflate_workspace {
|
2006-06-22 21:47:34 +00:00
|
|
|
struct inflate_state inflate_state;
|
2020-01-31 06:16:23 +00:00
|
|
|
#ifdef CONFIG_ZLIB_DFLTCC
|
|
|
|
struct dfltcc_state dfltcc_state;
|
|
|
|
unsigned char working_window[(1 << MAX_WBITS) + PAGE_SIZE];
|
|
|
|
#else
|
|
|
|
unsigned char working_window[(1 << MAX_WBITS)];
|
|
|
|
#endif
|
2005-04-16 22:20:36 +00:00
|
|
|
};
|
|
|
|
|
2020-01-31 06:16:23 +00:00
|
|
|
#ifdef CONFIG_ZLIB_DFLTCC
|
|
|
|
/* dfltcc_state must be doubleword aligned for DFLTCC call */
|
|
|
|
static_assert(offsetof(struct inflate_workspace, dfltcc_state) % 8 == 0);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define WS(strm) ((struct inflate_workspace *)(strm->workspace))
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
#endif
|