First public contribution.
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // ubootldr\inc\inflate.h
24 #if defined(__STDC__) || defined(PROTO)
25 # define OF(args) args
30 typedef unsigned char uch;
31 typedef unsigned short ush;
32 typedef unsigned long ulg;
34 /* Compression methods (see algorithm.doc) */
39 /* methods 4 to 7 reserved */
47 #define ZIP_WINDOW_SIZE 32768
49 /* PKZIP header definitions */
50 #define LOCSIG 0x04034b50L /* four-byte lead-in (lsb first) */
51 #define LOCFLG 6 /* offset of bit flag */
52 #define CRPFLG 1 /* bit for encrypted entry */
53 #define EXTFLG 8 /* bit for extended local header */
54 #define LOCHOW 8 /* offset of compression method */
55 #define LOCTIM 10 /* file mod time (for decryption) */
56 #define LOCCRC 14 /* offset of crc */
57 #define LOCSIZ 18 /* offset of compressed size */
58 #define LOCLEN 22 /* offset of uncompressed length */
59 #define LOCFIL 26 /* offset of file name field length */
60 #define LOCEXT 28 /* offset of extra field length */
61 #define LOCHDR 30 /* size of local header, including sig */
62 #define EXTHDR 16 /* size of extended local header, inc sig */
64 extern uch* volatile inbuf_end; /* pointer to last valid input byte+1 */
65 extern uch* volatile inptr; /* pointer to next byte to be processed in inbuf */
66 extern uch* volatile outptr; /* pointer to output data */
68 extern uch fill_inbuf();
69 extern void* malloc(unsigned);
70 extern void free(void*);
72 extern void process_block(int error);