crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianNativeTools/Include/inflate.h
changeset 0 818e61de6cd1
equal deleted inserted replaced
-1:000000000000 0:818e61de6cd1
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 * 
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __INFLATE_H__
       
    19 #define __INFLATE_H__
       
    20 
       
    21 #include "e32defwrap.h"
       
    22 #include "huffman.h"
       
    23 
       
    24 
       
    25 const TInt KDeflateMinLength=3;
       
    26 const TInt KDeflateMaxDistance=(1<<KDeflateDistanceMag);
       
    27 const TInt KDeflateDistCodeBase=0x200;
       
    28 
       
    29 /**
       
    30 Class for inflater
       
    31 @internalComponent
       
    32 @released
       
    33 */
       
    34 class CInflater
       
    35 {
       
    36 	public:
       
    37 		enum {EBufSize = 0x800, ESafetyZone=8};
       
    38 	public:
       
    39 		static CInflater* NewLC(TBitInput& aInput);
       
    40 		~CInflater();
       
    41 		TInt ReadL(TUint8* aBuffer,TInt aLength);
       
    42 		TInt SkipL(TInt aLength);
       
    43 	private:
       
    44 		CInflater(TBitInput& aInput);
       
    45 		void ConstructL();
       
    46 		void InitL();
       
    47 		TInt InflateL();
       
    48 	private:
       
    49 		TBitInput* iBits;
       
    50 		const TUint8* iRptr;			// partial segment
       
    51 		TInt iLen;
       
    52 		const TUint8* iAvail;			// available data
       
    53 		const TUint8* iLimit;
       
    54 		TEncoding* iEncoding;
       
    55 		TUint8* iOut;					// circular buffer for distance matches
       
    56 		TUint8 iHuff[EBufSize+ESafetyZone];	// huffman data
       
    57 };
       
    58 
       
    59 #endif
       
    60