28 #include <linux/module.h>
34 #include <linux/net.h>
36 #define DEFLATE_DEF_LEVEL Z_DEFAULT_COMPRESSION
37 #define DEFLATE_DEF_WINBITS 11
38 #define DEFLATE_DEF_MEMLEVEL MAX_MEM_LEVEL
70 static int deflate_decomp_init(
struct deflate_ctx *ctx)
92 static void deflate_comp_exit(
struct deflate_ctx *ctx)
98 static void deflate_decomp_exit(
struct deflate_ctx *ctx)
104 static int deflate_init(
struct crypto_tfm *tfm)
109 ret = deflate_comp_init(ctx);
112 ret = deflate_decomp_init(ctx);
114 deflate_comp_exit(ctx);
119 static void deflate_exit(
struct crypto_tfm *tfm)
123 deflate_comp_exit(ctx);
124 deflate_decomp_exit(ctx);
128 unsigned int slen,
u8 *
dst,
unsigned int *
dlen)
156 static int deflate_decompress(
struct crypto_tfm *tfm,
const u8 *src,
157 unsigned int slen,
u8 *dst,
unsigned int *dlen)
198 .cra_name =
"deflate",
202 .cra_init = deflate_init,
203 .cra_exit = deflate_exit,
204 .cra_u = { .compress = {
205 .coa_compress = deflate_compress,
206 .coa_decompress = deflate_decompress } }
209 static int __init deflate_mod_init(
void)
214 static void __exit deflate_mod_fini(
void)