Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <EZGzip.h>
Link against: ezlib.lib

Class CEZGZipToFile

class CEZGZipToFile : public CBase;

Description

A CEZGZipToFile object allows de-compression of a compressed file. The name of the compressed file is passed into the constructor along with a target file to contain the uncompressed data. The file is uncompressed by calling the CEZGZipToFile::InflateL() function.

Derivation

Members

Defined in CEZGZipToFile:

Inherited from CBase:

Related Topics


Construction and destruction


NewLC(RFs &,const TDesC &,RFile &,TInt)

IMPORT_C static CEZGZipToFile* NewLC(RFs &aRfs, const TDesC &aGzFileName, RFile &aOutput, TInt aBufferSize=0x8000);

Description

Creates a new CEZGZipToFile object and leaves it on the CleanupStack

Parameters

RFs &aRfs

open file server session

const TDesC16 &aGzFileName

name of the file to be de-compressed

RFile &aOutput

the target file to hold the un-compressed data

TInt aBufferSize

required size of buffers

Return value

CEZGZipToFile *

a pointer to the new CEZGZipToFile object, left on the CleanupStack


NewL(RFs &,const TDesC &,RFile &,TInt)

IMPORT_C static CEZGZipToFile* NewL(RFs &aRfs, const TDesC &aGzFileName, RFile &aOutput, TInt aBufferSize=0x8000);

Description

Creates a new CEZGZipToFile object

Parameters

RFs &aRfs

open file server session

const TDesC16 &aGzFileName

name of the file to be de-compressed

RFile &aOutput

the target file to hold the un-compressed data

TInt aBufferSize

required size of buffers

Return value

CEZGZipToFile *

a pointer to the new CEZGZipToFile object

[Top]


Member functions


ResetL(RFs &,const TDesC &,RFile &,TInt)

IMPORT_C void ResetL(RFs &aRfs, const TDesC &aGzFileName, RFile &aOutput, TInt aBufferSize=0x8000);

Description

Quits the current de-compression operation and restarts with the specified arguments

Parameters

RFs &aRfs

open file server session

const TDesC16 &aGzFileName

name of the file to be de-compressed

RFile &aOutput

the target file to hold the un-compressed data

TInt aBufferSize

required size of buffers

Leave codes

...

Any of the system wide error codes


InflateL()

IMPORT_C TBool InflateL();

Description

De-compresses the current zip file in stages. The function needs to called again until the de-compression is finalised, in which case it will return EFalse - for example...

while ( decompressor->InflateL() )
    {
    // No action required
    }

Return value

TBool

ETrue if the de-compression is not complete, and function must be called again EFalse if the de-compression is finalised

Leave codes

KEZlibErrBadGZipCrc

Invalid CRC check

...

Any of the system wide error codes