Lines Matching refs:zip_ops
48 static void zip_static_init_zip_ops(struct zip_operation *zip_ops, in zip_static_init_zip_ops() argument
51 zip_ops->flush = ZIP_FLUSH_FINISH; in zip_static_init_zip_ops()
54 zip_ops->speed = 1; in zip_static_init_zip_ops()
57 zip_ops->ccode = 0; /* Auto Huffman */ in zip_static_init_zip_ops()
58 zip_ops->lzs_flag = 0; in zip_static_init_zip_ops()
59 zip_ops->format = ZLIB_FORMAT; in zip_static_init_zip_ops()
61 zip_ops->ccode = 3; /* LZS Encoding */ in zip_static_init_zip_ops()
62 zip_ops->lzs_flag = 1; in zip_static_init_zip_ops()
63 zip_ops->format = LZS_FORMAT; in zip_static_init_zip_ops()
65 zip_ops->begin_file = 1; in zip_static_init_zip_ops()
66 zip_ops->history_len = 0; in zip_static_init_zip_ops()
67 zip_ops->end_file = 1; in zip_static_init_zip_ops()
68 zip_ops->compcode = 0; in zip_static_init_zip_ops()
69 zip_ops->csum = 1; /* Adler checksum desired */ in zip_static_init_zip_ops()
126 struct zip_operation *zip_ops = NULL; in zip_compress() local
142 zip_ops = &zip_ctx->zip_comp; in zip_compress()
144 zip_ops->input_len = slen; in zip_compress()
145 zip_ops->output_len = *dlen; in zip_compress()
146 memcpy(zip_ops->input, src, slen); in zip_compress()
148 ret = zip_deflate(zip_ops, zip_state, zip); in zip_compress()
151 *dlen = zip_ops->output_len; in zip_compress()
152 memcpy(dst, zip_ops->output, *dlen); in zip_compress()
162 struct zip_operation *zip_ops = NULL; in zip_decompress() local
178 zip_ops = &zip_ctx->zip_decomp; in zip_decompress()
179 memcpy(zip_ops->input, src, slen); in zip_decompress()
182 if (zip_ops->ccode != 3) /* Not LZS Encoding */ in zip_decompress()
183 zip_ops->input[slen++] = 0; in zip_decompress()
185 zip_ops->input_len = slen; in zip_decompress()
186 zip_ops->output_len = *dlen; in zip_decompress()
188 ret = zip_inflate(zip_ops, zip_state, zip); in zip_decompress()
191 *dlen = zip_ops->output_len; in zip_decompress()
192 memcpy(dst, zip_ops->output, *dlen); in zip_decompress()