Advanced Strategic Command
lzw.h
Go to the documentation of this file.
1 // $Id: lzw.h,v 1.3 2009-04-18 13:48:38 mbickel Exp $
2 //
3 // $Log: not supported by cvs2svn $
4 // Revision 1.2 1999/11/16 03:42:04 tmwilson
5 // Added CVS keywords to most of the files.
6 // Started porting the code to Linux (ifdef'ing the DOS specific stuff)
7 // Wrote replacement routines for kbhit/getch for Linux
8 // Cleaned up parts of the code that gcc barfed on (char vs unsigned char)
9 // Added autoconf/automake capabilities
10 // Added files used by 'automake --gnu'
11 //
12 //
13 /*
14  This file is part of Advanced Strategic Command; http://www.asc-hq.de
15  Copyright (C) 1994-2010 Martin Bickel and Marc Schellenberger
16 
17  This program is free software; you can redistribute it and/or modify
18  it under the terms of the GNU General Public License as published by
19  the Free Software Foundation; either version 2 of the License, or
20  (at your option) any later version.
21 
22  This program is distributed in the hope that it will be useful,
23  but WITHOUT ANY WARRANTY; without even the implied warranty of
24  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  GNU General Public License for more details.
26 
27  You should have received a copy of the GNU General Public License
28  along with this program; see the file COPYING. If not, write to the
29  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
30  Boston, MA 02111-1307 USA
31 */
32 
33 /*--- lzw.h ------------------------------- Listing 9-8 --------
34  * Header file for LZW compression routines *
35  *-------------------------------------------------------------*/
36 
37 /* Critical sizes for LZW */
38 #define PRESET_CODE_MAX 256 /* codes like this are preset */
39 #define END_OF_INPUT 256 /* this code terminates input */
40 #define NEW_DICTIONARY 257 /* reinitialize the dictionary */
41 #define UNUSED_CODE 258 /* an invalid code */
42 #define STARTING_CODE 259 /* first code we can use */
43 #define MAX_CODE 65536 /* 2 ^ BITS */
44 #define DICTIONARY_SIZE 81901L /* a prime # > MAX_CODE * 1.2 */
45 
46 typedef unsigned short CodeType; /* can hold MAX_CODE */
47 typedef unsigned long IndexType; /* can hold DICTIONARY_SIZE */
48 typedef unsigned long CountType; /* used for statistics only */
49 
50 extern const char* LZ_SIGNATURE ;
51 extern const char* RLE_SIGNATURE ;
unsigned long IndexType
Definition: lzw.h:47
unsigned long CountType
Definition: lzw.h:48
const char * RLE_SIGNATURE
Definition: basestrm.cpp:89
unsigned short CodeType
Definition: lzw.h:46
const char * LZ_SIGNATURE
Definition: basestrm.cpp:88