epoc32/include/ezdecompressor.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 // EZLib: DECOMPRESSOR.H
       
    15 // Declaration for Decompression class
    14 // Declaration for Decompression class
    16 // 
    15 // 
    17 //
    16 //
    18 
    17 
    19 #ifndef __EZDECOMPRESSOR_H__
    18 #ifndef __EZDECOMPRESSOR_H__
    27 The CEZDecompressor class provides in-memory de-compression functions, including integrity checks of the compressed data.
    26 The CEZDecompressor class provides in-memory de-compression functions, including integrity checks of the compressed data.
    28 This version of the library supports only one compression / de-compression method (deflation / inflation).  De-compression
    27 This version of the library supports only one compression / de-compression method (deflation / inflation).  De-compression
    29 can be done in a single step (using DecompressL()) if the buffers are large enough (for example if an input file is mmap'ed),
    28 can be done in a single step (using DecompressL()) if the buffers are large enough (for example if an input file is mmap'ed),
    30 or can be done by repeated calls of the InflateL() function.  The source data is de-compressed to the target buffer (both source 
    29 or can be done by repeated calls of the InflateL() function.  The source data is de-compressed to the target buffer (both source 
    31 and target contained within the buffer manager argument).
    30 and target contained within the buffer manager argument).
       
    31 
       
    32 Note: In this version of the library a windowBits value of 8 is unsupported due to a problem with the window size being 
       
    33 set to 256 bytes. Although a value of 8 will be accepted by the CEZCompressor constructors, as it is being changed 
       
    34 internally by Zlib from 8 to 9, it will not be possible to use the same value for decompression. This is because the 
       
    35 Zlib functions called by the CEZDecompressor constructors do not make the same change internally and as a result a 
       
    36 KEZlibErrData is returned when calling InflateL(). It is therefore advised that for this version of the library 
       
    37 windowBits of 9 is used in place of 8.
    32 
    38 
    33 @publishedAll
    39 @publishedAll
    34 @released
    40 @released
    35 */
    41 */
    36 class CEZDecompressor : public CEZZStream
    42 class CEZDecompressor : public CEZZStream
    63 
    69 
    64 	IMPORT_C void ResetL(MEZBufferManager& aInit);
    70 	IMPORT_C void ResetL(MEZBufferManager& aInit);
    65 	IMPORT_C TBool InflateL();
    71 	IMPORT_C TBool InflateL();
    66 
    72 
    67 	IMPORT_C static void DecompressL(TDes8 &aDestination, const TDesC8 &aSource);
    73 	IMPORT_C static void DecompressL(TDes8 &aDestination, const TDesC8 &aSource);
    68 
    74 	
    69 	private:
    75 	private:
    70 		enum TInflationState
    76 		enum TInflationState
    71 			{
    77 			{
    72 			ENoFlush,
    78 			ENoFlush,
    73 			EFinalize,
    79 			EFinalize,
    86 		const TUint8* iDictionary;
    92 		const TUint8* iDictionary;
    87 		TInt iDictionaryLength;
    93 		TInt iDictionaryLength;
    88 	};
    94 	};
    89 
    95 
    90 #endif
    96 #endif
       
    97 
       
    98