os/kernelhwsrv/brdbootldr/ubootldr/inc/inflate.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// ubootldr\inc\inflate.h
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#ifndef __INFLATE_H__
sl@0
    19
#define __INFLATE_H__
sl@0
    20
#ifdef __cplusplus
sl@0
    21
extern "C" {
sl@0
    22
#endif
sl@0
    23
sl@0
    24
#if defined(__STDC__) || defined(PROTO)
sl@0
    25
#  define OF(args)  args
sl@0
    26
#else
sl@0
    27
#  define OF(args)  ()
sl@0
    28
#endif
sl@0
    29
sl@0
    30
typedef unsigned char  uch;
sl@0
    31
typedef unsigned short ush;
sl@0
    32
typedef unsigned long  ulg;
sl@0
    33
sl@0
    34
/* Compression methods (see algorithm.doc) */
sl@0
    35
#define STORED      0
sl@0
    36
#define COMPRESSED  1
sl@0
    37
#define PACKED      2
sl@0
    38
#define LZHED       3
sl@0
    39
/* methods 4 to 7 reserved */
sl@0
    40
#define DEFLATED    8
sl@0
    41
#define MAX_METHODS 9
sl@0
    42
sl@0
    43
#ifndef NULL
sl@0
    44
#define NULL	(0)
sl@0
    45
#endif
sl@0
    46
sl@0
    47
#define ZIP_WINDOW_SIZE 32768
sl@0
    48
sl@0
    49
/* PKZIP header definitions */
sl@0
    50
#define LOCSIG 0x04034b50L      /* four-byte lead-in (lsb first) */
sl@0
    51
#define LOCFLG 6                /* offset of bit flag */
sl@0
    52
#define  CRPFLG 1               /*  bit for encrypted entry */
sl@0
    53
#define  EXTFLG 8               /*  bit for extended local header */
sl@0
    54
#define LOCHOW 8                /* offset of compression method */
sl@0
    55
#define LOCTIM 10               /* file mod time (for decryption) */
sl@0
    56
#define LOCCRC 14               /* offset of crc */
sl@0
    57
#define LOCSIZ 18               /* offset of compressed size */
sl@0
    58
#define LOCLEN 22               /* offset of uncompressed length */
sl@0
    59
#define LOCFIL 26               /* offset of file name field length */
sl@0
    60
#define LOCEXT 28               /* offset of extra field length */
sl@0
    61
#define LOCHDR 30               /* size of local header, including sig */
sl@0
    62
#define EXTHDR 16               /* size of extended local header, inc sig */
sl@0
    63
sl@0
    64
extern uch* volatile inbuf_end;		/* pointer to last valid input byte+1 */
sl@0
    65
extern uch* volatile inptr;			/* pointer to next byte to be processed in inbuf */
sl@0
    66
extern uch* volatile outptr;		/* pointer to output data */
sl@0
    67
sl@0
    68
extern uch fill_inbuf();
sl@0
    69
extern void* malloc(unsigned);
sl@0
    70
extern void free(void*);
sl@0
    71
sl@0
    72
extern void process_block(int error);
sl@0
    73
extern int inflate();
sl@0
    74
sl@0
    75
#ifdef __cplusplus
sl@0
    76
}
sl@0
    77
#endif
sl@0
    78
#endif