2 * Copyright (C) 2018 Chelsio Communications. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * The full GNU General Public License is included in this distribution in
14 * the file called "COPYING".
18 #ifndef __CUDBG_ZLIB_H__
19 #define __CUDBG_ZLIB_H__
21 #include <linux/zlib.h>
23 #define CUDBG_ZLIB_COMPRESS_ID 17
24 #define CUDBG_ZLIB_WIN_BITS 12
25 #define CUDBG_ZLIB_MEM_LVL 4
27 struct cudbg_compress_hdr
{
34 static inline int cudbg_get_workspace_size(void)
36 return zlib_deflate_workspacesize(CUDBG_ZLIB_WIN_BITS
,
40 int cudbg_compress_buff(struct cudbg_init
*pdbg_init
,
41 struct cudbg_buffer
*pin_buff
,
42 struct cudbg_buffer
*pout_buff
);
43 #endif /* __CUDBG_ZLIB_H__ */