sl@0: // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\misc\inflate.h sl@0: // sl@0: // sl@0: sl@0: #ifndef __INFLATE_H__ sl@0: #define __INFLATE_H__ sl@0: #ifdef __cplusplus sl@0: extern "C" { sl@0: #endif sl@0: sl@0: #if defined(__STDC__) || defined(PROTO) sl@0: # define OF(args) args sl@0: #else sl@0: # define OF(args) () sl@0: #endif sl@0: sl@0: typedef unsigned char uch; sl@0: typedef unsigned short ush; sl@0: typedef unsigned long ulg; sl@0: sl@0: /* Compression methods (see algorithm.doc) */ sl@0: #define STORED 0 sl@0: #define COMPRESSED 1 sl@0: #define PACKED 2 sl@0: #define LZHED 3 sl@0: /* methods 4 to 7 reserved */ sl@0: #define DEFLATED 8 sl@0: #define MAX_METHODS 9 sl@0: sl@0: #ifndef NULL sl@0: #define NULL ((void*)0) sl@0: #endif sl@0: sl@0: #define ZIP_WINDOW_SIZE 32768 sl@0: sl@0: /* PKZIP header definitions */ sl@0: #define LOCSIG 0x04034b50L /* four-byte lead-in (lsb first) */ sl@0: #define LOCFLG 6 /* offset of bit flag */ sl@0: #define CRPFLG 1 /* bit for encrypted entry */ sl@0: #define EXTFLG 8 /* bit for extended local header */ sl@0: #define LOCHOW 8 /* offset of compression method */ sl@0: #define LOCTIM 10 /* file mod time (for decryption) */ sl@0: #define LOCCRC 14 /* offset of crc */ sl@0: #define LOCSIZ 18 /* offset of compressed size */ sl@0: #define LOCLEN 22 /* offset of uncompressed length */ sl@0: #define LOCFIL 26 /* offset of file name field length */ sl@0: #define LOCEXT 28 /* offset of extra field length */ sl@0: #define LOCHDR 30 /* size of local header, including sig */ sl@0: #define EXTHDR 16 /* size of extended local header, inc sig */ sl@0: sl@0: extern uch* volatile inbuf_end; /* pointer to last valid input byte+1 */ sl@0: extern uch* volatile inptr; /* pointer to next byte to be processed in inbuf */ sl@0: extern uch* volatile outptr; /* pointer to output data */ sl@0: sl@0: extern uch fill_inbuf(void); sl@0: extern void* malloc(unsigned); sl@0: extern void free(void*); sl@0: sl@0: extern void process_block(int error); sl@0: extern int inflate(void); sl@0: sl@0: #ifdef __cplusplus sl@0: } sl@0: #endif sl@0: #endif