Zip.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * The Python Imaging Library.
  3. * $Id$
  4. *
  5. * declarations for the ZIP codecs
  6. *
  7. * Copyright (c) Fredrik Lundh 1996.
  8. */
  9. #include "zlib.h"
  10. /* modes */
  11. #define ZIP_PNG 0 /* continuous, filtered image data */
  12. #define ZIP_PNG_PALETTE 1 /* non-continuous data, disable filtering */
  13. #define ZIP_TIFF_PREDICTOR 2 /* TIFF, with predictor */
  14. #define ZIP_TIFF 3 /* TIFF, without predictor */
  15. typedef struct {
  16. /* CONFIGURATION */
  17. /* Codec mode */
  18. int mode;
  19. /* Optimize (max compression) SLOW!!! */
  20. int optimize;
  21. /* 0 no compression, 9 best compression, -1 default compression */
  22. int compress_level;
  23. /* compression strategy Z_XXX */
  24. int compress_type;
  25. /* Predefined dictionary (experimental) */
  26. char* dictionary;
  27. int dictionary_size;
  28. /* PRIVATE CONTEXT (set by decoder/encoder) */
  29. z_stream z_stream; /* (de)compression stream */
  30. UINT8* previous; /* previous line (allocated) */
  31. int last_output; /* # bytes last output by inflate */
  32. /* Compressor specific stuff */
  33. UINT8* prior; /* filter storage (allocated) */
  34. UINT8* up;
  35. UINT8* average;
  36. UINT8* paeth;
  37. UINT8* output; /* output data */
  38. int prefix; /* size of filter prefix (0 for TIFF data) */
  39. int interlaced; /* is the image interlaced? (PNG) */
  40. int pass; /* current pass of the interlaced image (PNG) */
  41. } ZIPSTATE;