1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/brdbootldr/ubootldr/inc/inflate.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,78 @@
1.4 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// ubootldr\inc\inflate.h
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef __INFLATE_H__
1.22 +#define __INFLATE_H__
1.23 +#ifdef __cplusplus
1.24 +extern "C" {
1.25 +#endif
1.26 +
1.27 +#if defined(__STDC__) || defined(PROTO)
1.28 +# define OF(args) args
1.29 +#else
1.30 +# define OF(args) ()
1.31 +#endif
1.32 +
1.33 +typedef unsigned char uch;
1.34 +typedef unsigned short ush;
1.35 +typedef unsigned long ulg;
1.36 +
1.37 +/* Compression methods (see algorithm.doc) */
1.38 +#define STORED 0
1.39 +#define COMPRESSED 1
1.40 +#define PACKED 2
1.41 +#define LZHED 3
1.42 +/* methods 4 to 7 reserved */
1.43 +#define DEFLATED 8
1.44 +#define MAX_METHODS 9
1.45 +
1.46 +#ifndef NULL
1.47 +#define NULL (0)
1.48 +#endif
1.49 +
1.50 +#define ZIP_WINDOW_SIZE 32768
1.51 +
1.52 +/* PKZIP header definitions */
1.53 +#define LOCSIG 0x04034b50L /* four-byte lead-in (lsb first) */
1.54 +#define LOCFLG 6 /* offset of bit flag */
1.55 +#define CRPFLG 1 /* bit for encrypted entry */
1.56 +#define EXTFLG 8 /* bit for extended local header */
1.57 +#define LOCHOW 8 /* offset of compression method */
1.58 +#define LOCTIM 10 /* file mod time (for decryption) */
1.59 +#define LOCCRC 14 /* offset of crc */
1.60 +#define LOCSIZ 18 /* offset of compressed size */
1.61 +#define LOCLEN 22 /* offset of uncompressed length */
1.62 +#define LOCFIL 26 /* offset of file name field length */
1.63 +#define LOCEXT 28 /* offset of extra field length */
1.64 +#define LOCHDR 30 /* size of local header, including sig */
1.65 +#define EXTHDR 16 /* size of extended local header, inc sig */
1.66 +
1.67 +extern uch* volatile inbuf_end; /* pointer to last valid input byte+1 */
1.68 +extern uch* volatile inptr; /* pointer to next byte to be processed in inbuf */
1.69 +extern uch* volatile outptr; /* pointer to output data */
1.70 +
1.71 +extern uch fill_inbuf();
1.72 +extern void* malloc(unsigned);
1.73 +extern void free(void*);
1.74 +
1.75 +extern void process_block(int error);
1.76 +extern int inflate();
1.77 +
1.78 +#ifdef __cplusplus
1.79 +}
1.80 +#endif
1.81 +#endif