diff options
Diffstat (limited to 'Imaging/libImaging/Lzw.h')
-rw-r--r-- | Imaging/libImaging/Lzw.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Imaging/libImaging/Lzw.h b/Imaging/libImaging/Lzw.h new file mode 100644 index 0000000..3e6faa2 --- /dev/null +++ b/Imaging/libImaging/Lzw.h @@ -0,0 +1,52 @@ +/* + * The Python Imaging Library. + * $Id: Lzw.h 2134 2004-10-06 08:55:20Z fredrik $ + * + * declarations for the TIFF LZW decoder. + * + * Copyright (c) Fredrik Lundh 1995-96. + */ + + +/* Max size for LZW code words */ + +#define LZWBITS 12 + +#define LZWTABLE (1<<LZWBITS) +#define LZWBUFFER (1<<LZWBITS) + + +typedef struct { + + /* CONFIGURATION */ + + /* Filter type */ + int filter; + + /* PRIVATE CONTEXT (set by decoder) */ + + /* Input bit buffer */ + INT32 bitbuffer; + int bitcount; + + /* Code buffer */ + int codesize; + int codemask; + + /* Constant symbol codes */ + int clear, end; + + /* Symbol history */ + int lastcode; + unsigned char lastdata; + + /* History buffer */ + int bufferindex; + unsigned char buffer[LZWTABLE]; + + /* Symbol table */ + unsigned INT16 link[LZWTABLE]; + unsigned char data[LZWTABLE]; + int next; + +} LZWSTATE; |