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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
15 // Declaration for CEZStream class.
19 #ifndef __EZZSTREAM_H__
20 #define __EZZSTREAM_H__
24 #include <ezliberrorcodes.h>
27 Represents a zip stream
32 class CEZZStream : public CBase
35 /** stream panic values */
38 EStreamError = -Z_STREAM_ERROR,
39 EDataError = -Z_DATA_ERROR,
40 EBufError = -Z_BUF_ERROR,
41 EVersionError = -Z_VERSION_ERROR,
45 IMPORT_C void SetInput(const TDesC8& aInputData);
46 IMPORT_C void SetOutput(TDes8& aOutputData);
48 IMPORT_C TPtrC8 OutputDescriptor() const;
49 IMPORT_C TInt TotalOut() const;
50 IMPORT_C TInt TotalIn() const;
51 IMPORT_C TInt32 Adler32() const;
52 IMPORT_C TInt AvailIn() const;
53 IMPORT_C TInt AvailOut() const;
55 IMPORT_C TInt Progress(TInt aTotalLength) const;
64 // This pointer is reset every time SetOutput is called. It maintains a pointer to the
65 // start of the output buffer which is being written to. We cannot use iStream.next_out,
66 // because zlib will modifify this during its deflate and inflate.
68 TUint8* iOutputPointer;
69 TInt iOutputBufferLength;