/*****************************************************************************/ /* File Name : inflate.h - standard definitions header for ungzip */ /*****************************************************************************/ /* Modification History */ /* -------------------- */ /* Ver.01-00 11May98 written: some culled from gzip header files */ /* (STR) M.Deguchi */ /*****************************************************************************/ typedef unsigned char uch; typedef unsigned short ush; typedef unsigned long ulg; #if !defined(NULL) #define NULL 0 #endif #ifndef LOCAL # define LOCAL static #endif #define DEFLATED 8 #define CONTINUE 0xFF #define STORED 0x01 #define FIXED 0x02 #define DYNAMIC 0x04 #define FIRST_STATE 0x01 #define SECOUND_STATE 0x02 #define INBUFSIZ 0x8000 /* input buffer size */ #define WSIZE 0x8000 /* window size--must be a power of two, */ /* and at least 32K for zip's deflate method */ #define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part */ #define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ #define ORIG_NAME 0x08 /* bit 3 set: original file name present */ #define COMMENT 0x10 /* bit 4 set: file comment present */ #define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */ #define RESERVED 0xC0 /* bit 6,7: reserved */ #define SH(p) ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8)) #define LG(p) ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16)) #ifndef ZFILE struct _zld_iobuff { char *zstart_ptr; long zfile_size; char *zend_ptr; char *zcurrent_ptr; long zread_bytes; int zcompress_bits; short magic_No; }; # define ZFILE struct _zld_iobuff #endif typedef struct _WINDOW_BUFF{ unsigned outcnt; struct _WINDOW_BUFF *next; uch outbuff[ 2L * WSIZE ]; } WINDOW_BUFF;