szlibx.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved.
  2. This file is part of AFPL Ghostscript.
  3. AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author or
  4. distributor accepts any responsibility for the consequences of using it, or
  5. for whether it serves any particular purpose or works at all, unless he or
  6. she says so in writing. Refer to the Aladdin Free Public License (the
  7. "License") for full details.
  8. Every copy of AFPL Ghostscript must include a copy of the License, normally
  9. in a plain ASCII text file named PUBLIC. The License grants you the right
  10. to copy, modify and redistribute AFPL Ghostscript, but only under certain
  11. conditions described in the License. Among other things, the License
  12. requires that the copyright notice and this notice be preserved on all
  13. copies.
  14. */
  15. /*$Id: szlibx.h,v 1.2 2000/09/19 19:00:51 lpd Exp $ */
  16. /* zlib filter state definition */
  17. #ifndef szlibx_INCLUDED
  18. # define szlibx_INCLUDED
  19. /* Define an opaque type for the dynamic part of the state. */
  20. typedef struct zlib_dynamic_state_s zlib_dynamic_state_t;
  21. /* Define the stream state structure. */
  22. typedef struct stream_zlib_state_s {
  23. stream_state_common;
  24. /* Parameters - compression and decompression */
  25. int windowBits;
  26. bool no_wrapper; /* omit wrapper and checksum */
  27. /* Parameters - compression only */
  28. int level; /* effort level */
  29. int method;
  30. int memLevel;
  31. int strategy;
  32. /* Dynamic state */
  33. zlib_dynamic_state_t *dynamic;
  34. } stream_zlib_state;
  35. /*
  36. * The state descriptor is public only to allow us to split up
  37. * the encoding and decoding filters.
  38. */
  39. extern_st(st_zlib_state);
  40. #define public_st_zlib_state() /* in szlibc.c */\
  41. gs_public_st_ptrs1(st_zlib_state, stream_zlib_state,\
  42. "zlibEncode/Decode state", zlib_state_enum_ptrs, zlib_state_reloc_ptrs,\
  43. dynamic)
  44. extern const stream_template s_zlibD_template;
  45. extern const stream_template s_zlibE_template;
  46. /* Shared procedures */
  47. stream_proc_set_defaults(s_zlib_set_defaults);
  48. #endif /* szlibx_INCLUDED */