1 // Copyright (c) 1999-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 "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 // Declaration for CEZStream class.  
 
    18 #ifndef __EZZSTREAM_H__
 
    19 #define __EZZSTREAM_H__
 
    23 #include <ezliberrorcodes.h>
 
    26 Represents a zip stream
 
    31 class CEZZStream : public CBase
 
    34 /** stream panic values */
 
    37 		EStreamError = -Z_STREAM_ERROR,
 
    38 		EDataError = -Z_DATA_ERROR,
 
    39 		EBufError = -Z_BUF_ERROR,
 
    40 		EVersionError = -Z_VERSION_ERROR,
 
    44 	IMPORT_C void SetInput(const TDesC8& aInputData);
 
    45 	IMPORT_C void SetOutput(TDes8& aOutputData);
 
    47 	IMPORT_C TPtrC8 OutputDescriptor() const;
 
    48 	IMPORT_C TInt TotalOut() const;
 
    49 	IMPORT_C TInt TotalIn() const;
 
    50 	IMPORT_C TInt32 Adler32() const;
 
    51 	IMPORT_C TInt AvailIn() const;
 
    52 	IMPORT_C TInt AvailOut() const;
 
    54 	IMPORT_C TInt Progress(TInt aTotalLength) const;
 
    63 	// This pointer is reset every time SetOutput is called.  It maintains a pointer to the
 
    64 	// start of the output buffer which is being written to.  We cannot use iStream.next_out,
 
    65 	// because zlib will modifify this during its deflate and inflate.
 
    67 	TUint8* iOutputPointer;
 
    68 	TInt iOutputBufferLength;