00001 // $Id: lzw.h,v 1.2 1999-11-16 03:42:04 tmwilson Exp $ 00002 // 00003 // $Log: lzw.h,v $ 00004 // Revision 1.2 1999-11-16 03:42:04 tmwilson 00005 // Added CVS keywords to most of the files. 00006 // Started porting the code to Linux (ifdef'ing the DOS specific stuff) 00007 // Wrote replacement routines for kbhit/getch for Linux 00008 // Cleaned up parts of the code that gcc barfed on (char vs unsigned char) 00009 // Added autoconf/automake capabilities 00010 // Added files used by 'automake --gnu' 00011 // 00012 // 00013 /* 00014 This file is part of Advanced Strategic Command; http://www.asc-hq.de 00015 Copyright (C) 1994-1999 Martin Bickel and Marc Schellenberger 00016 00017 This program is free software; you can redistribute it and/or modify 00018 it under the terms of the GNU General Public License as published by 00019 the Free Software Foundation; either version 2 of the License, or 00020 (at your option) any later version. 00021 00022 This program is distributed in the hope that it will be useful, 00023 but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00025 GNU General Public License for more details. 00026 00027 You should have received a copy of the GNU General Public License 00028 along with this program; see the file COPYING. If not, write to the 00029 Free Software Foundation, Inc., 59 Temple Place, Suite 330, 00030 Boston, MA 02111-1307 USA 00031 */ 00032 00033 /*--- lzw.h ------------------------------- Listing 9-8 -------- 00034 * Header file for LZW compression routines * 00035 *-------------------------------------------------------------*/ 00036 00037 /* Critical sizes for LZW */ 00038 #define PRESET_CODE_MAX 256 /* codes like this are preset */ 00039 #define END_OF_INPUT 256 /* this code terminates input */ 00040 #define NEW_DICTIONARY 257 /* reinitialize the dictionary */ 00041 #define UNUSED_CODE 258 /* an invalid code */ 00042 #define STARTING_CODE 259 /* first code we can use */ 00043 #define MAX_CODE 65536 /* 2 ^ BITS */ 00044 #define DICTIONARY_SIZE 81901L /* a prime # > MAX_CODE * 1.2 */ 00045 00046 typedef unsigned short CodeType; /* can hold MAX_CODE */ 00047 typedef unsigned long IndexType; /* can hold DICTIONARY_SIZE */ 00048 typedef unsigned long CountType; /* used for statistics only */ 00049 00050 extern const char* LZ_SIGNATURE ; 00051 extern const char* RLE_SIGNATURE ;
1.4.2