Lines Matching refs:deflate
33 ctx->u.deflate = lws_malloc(sizeof(*ctx->u.deflate), __func__); in lcs_init_compression_deflate()
35 if (!ctx->u.deflate) in lcs_init_compression_deflate()
38 memset(ctx->u.deflate, 0, sizeof(*ctx->u.deflate)); in lcs_init_compression_deflate()
41 (n = deflateInit2(ctx->u.deflate, 1, Z_DEFLATED, -15, 8, in lcs_init_compression_deflate()
44 lws_free_set_NULL(ctx->u.deflate); in lcs_init_compression_deflate()
50 inflateInit2(ctx->u.deflate, 16 + 15) != Z_OK) { in lcs_init_compression_deflate()
51 lws_free_set_NULL(ctx->u.deflate); in lcs_init_compression_deflate()
65 ctx->u.deflate->next_in = (void *)in; in lcs_process_deflate()
66 ctx->u.deflate->avail_in = *ilen_iused; in lcs_process_deflate()
68 ctx->u.deflate->next_out = out; in lcs_process_deflate()
69 ctx->u.deflate->avail_out = *olen_oused; in lcs_process_deflate()
72 n = deflate(ctx->u.deflate, Z_SYNC_FLUSH); in lcs_process_deflate()
74 n = inflate(ctx->u.deflate, Z_SYNC_FLUSH); in lcs_process_deflate()
85 *ilen_iused -= ctx->u.deflate->avail_in; in lcs_process_deflate()
86 *olen_oused -= ctx->u.deflate->avail_out; in lcs_process_deflate()
101 deflateEnd((*ctx).u.deflate); in lcs_destroy_deflate()
103 inflateEnd((*ctx).u.deflate); in lcs_destroy_deflate()
105 lws_free_set_NULL(ctx->u.deflate); in lcs_destroy_deflate()