1 /* Copyright (C) 2001-2019 Artifex Software, Inc.
2    All Rights Reserved.
3 
4    This software is provided AS-IS with no warranty, either express or
5    implied.
6 
7    This software is distributed under license and may not be copied,
8    modified or distributed except as expressly authorized under the terms
9    of the license contained in the file LICENSE in this distribution.
10 
11    Refer to licensing information at http://www.artifex.com or contact
12    Artifex Software, Inc.,  1305 Grant Avenue - Suite 200, Novato,
13    CA 94945, U.S.A., +1(415)492-9861, for further information.
14 */
15 
16 
17 /* zlib filter state definition */
18 
19 #ifndef szlibx_INCLUDED
20 #  define szlibx_INCLUDED
21 
22 #include "scommon.h"
23 
24 /* Define an opaque type for the dynamic part of the state. */
25 typedef struct zlib_dynamic_state_s zlib_dynamic_state_t;
26 
27 /* Define the stream state structure. */
28 typedef struct stream_zlib_state_s {
29     stream_state_common;
30     /* Parameters - compression and decompression */
31     int windowBits;
32     bool no_wrapper;		/* omit wrapper and checksum */
33     /* Parameters - compression only */
34     int level;			/* effort level */
35     int method;
36     int memLevel;
37     int strategy;
38     /* Dynamic state */
39     zlib_dynamic_state_t *dynamic;
40 } stream_zlib_state;
41 
42 /*
43  * The state descriptor is public only to allow us to split up
44  * the encoding and decoding filters.
45  */
46 extern_st(st_zlib_state);
47 #define public_st_zlib_state()	/* in szlibc.c */\
48   gs_public_st_ptrs1(st_zlib_state, stream_zlib_state,\
49     "zlibEncode/Decode state", zlib_state_enum_ptrs, zlib_state_reloc_ptrs,\
50     dynamic)
51 extern const stream_template s_zlibD_template;
52 extern const stream_template s_zlibE_template;
53 
54 /* Shared procedures */
55 stream_proc_set_defaults(s_zlib_set_defaults);
56 
57 #endif /* szlibx_INCLUDED */
58