xref: /plan9/sys/src/cmd/gs/src/szlibx.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises.  All rights reserved.
2 
3   This software is provided AS-IS with no warranty, either express or
4   implied.
5 
6   This software is distributed under license and may not be copied,
7   modified or distributed except as expressly authorized under the terms
8   of the license contained in the file LICENSE in this distribution.
9 
10   For more information about licensing, please refer to
11   http://www.ghostscript.com/licensing/. For information on
12   commercial licensing, go to http://www.artifex.com/licensing/ or
13   contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14   San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15 */
16 
17 /* $Id: szlibx.h,v 1.4 2002/02/21 22:24:54 giles Exp $ */
18 /* zlib filter state definition */
19 
20 #ifndef szlibx_INCLUDED
21 #  define szlibx_INCLUDED
22 
23 /* Define an opaque type for the dynamic part of the state. */
24 typedef struct zlib_dynamic_state_s zlib_dynamic_state_t;
25 
26 /* Define the stream state structure. */
27 typedef struct stream_zlib_state_s {
28     stream_state_common;
29     /* Parameters - compression and decompression */
30     int windowBits;
31     bool no_wrapper;		/* omit wrapper and checksum */
32     /* Parameters - compression only */
33     int level;			/* effort level */
34     int method;
35     int memLevel;
36     int strategy;
37     /* Dynamic state */
38     zlib_dynamic_state_t *dynamic;
39 } stream_zlib_state;
40 
41 /*
42  * The state descriptor is public only to allow us to split up
43  * the encoding and decoding filters.
44  */
45 extern_st(st_zlib_state);
46 #define public_st_zlib_state()	/* in szlibc.c */\
47   gs_public_st_ptrs1(st_zlib_state, stream_zlib_state,\
48     "zlibEncode/Decode state", zlib_state_enum_ptrs, zlib_state_reloc_ptrs,\
49     dynamic)
50 extern const stream_template s_zlibD_template;
51 extern const stream_template s_zlibE_template;
52 
53 /* Shared procedures */
54 stream_proc_set_defaults(s_zlib_set_defaults);
55 
56 #endif /* szlibx_INCLUDED */
57