Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: EZGzip.h
Link against: ezlib.lib

Class CEZFileToGZip

class CEZFileToGZip : public CBase;

Description

A CEZFileToGZip object allows compression of an uncompressed file to a zip file. The uncompressed source file is passed into the constructor along with the name of the target zip file. The file is compressed by calling the DeflateL() function.

Derivation

Members

Defined in CEZFileToGZip:
DeflateL(), NewL(), NewLC(), ResetL()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewLC()

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

Description

Creates a new CEZFileToGZip object and leaves it on the CleanupStack

Parameters

RFs &aRfs

open file server session

const TDesC &aGzFileName

the name of the target zip file

RFile &aInput

the file to compress

TInt aBufferSize

required size of buffers

Return value

CEZFileToGZip *

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


NewL()

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

Description

Creates a new CEZFileToGZip object and leaves it on the CleanupStack

Parameters

RFs &aRfs

open file server session

const TDesC &aGzFileName

the name of the target zip file

RFile &aInput

the file to compress

TInt aBufferSize

required size of buffers

Return value

CEZFileToGZip *

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

[Top]


Member functions


ResetL()

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

Description

Quits the current compression operation and restarts with the specified arguments

Parameters

RFs &aRfs

open file server session

const TDesC &aGzFileName

the name of the target zip file

RFile &aInput

the file to compress

TInt aBufferSize

required size of buffers

Leave codes

...

Any of the system wide error codes


DeflateL()

IMPORT_C TBool DeflateL();

Description

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

while ( compressor->DeflateL() )
    {
    // No action required
    }

Return value

TBool

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

Leave codes

...

Any of the system wide error codes