Lines Matching refs:zctx
33 struct deflate_ctx *zctx = ctx->context; in deflate_destroy() local
35 if (!zctx) in deflate_destroy()
38 if (zctx->cctx.workspace) { in deflate_destroy()
39 zlib_deflateEnd(&zctx->cctx); in deflate_destroy()
40 vfree(zctx->cctx.workspace); in deflate_destroy()
42 if (zctx->dctx.workspace) { in deflate_destroy()
43 zlib_inflateEnd(&zctx->dctx); in deflate_destroy()
44 vfree(zctx->dctx.workspace); in deflate_destroy()
46 kfree(zctx); in deflate_destroy()
51 struct deflate_ctx *zctx; in deflate_create() local
55 zctx = kzalloc(sizeof(*zctx), GFP_KERNEL); in deflate_create()
56 if (!zctx) in deflate_create()
59 ctx->context = zctx; in deflate_create()
61 zctx->cctx.workspace = vzalloc(sz); in deflate_create()
62 if (!zctx->cctx.workspace) in deflate_create()
65 ret = zlib_deflateInit2(&zctx->cctx, params->level, Z_DEFLATED, in deflate_create()
72 zctx->dctx.workspace = vzalloc(sz); in deflate_create()
73 if (!zctx->dctx.workspace) in deflate_create()
76 ret = zlib_inflateInit2(&zctx->dctx, -DEFLATE_DEF_WINBITS); in deflate_create()
90 struct deflate_ctx *zctx = ctx->context; in deflate_compress() local
94 deflate = &zctx->cctx; in deflate_compress()
116 struct deflate_ctx *zctx = ctx->context; in deflate_decompress() local
120 inflate = &zctx->dctx; in deflate_decompress()