Files
SDK_SG200x_V2/linux_5.10/lib/zlib_inflate/infutil.h
carbon 0545e9dc6d init version 2024-05-07
commit d1edce71135cc6d98c0a4b5729774542b676e769
Author: sophgo-forum-service <forum_service@sophgo.com>
Date:   Fri Mar 15 16:07:33 2024 +0800

    [fix] recommend using ssh method to clone repo.
    [fix] fix sensor driver repo branch name.
2024-05-07 19:36:36 +08:00

40 lines
1.0 KiB
C

/* 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
#include <linux/zlib.h>
#ifdef CONFIG_ZLIB_DFLTCC
#include "../zlib_dfltcc/dfltcc.h"
#include <asm/page.h>
#endif
/* memory allocation for inflation */
struct inflate_workspace {
struct inflate_state inflate_state;
#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
};
#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))
#endif