Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <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 CEZFileToGZip::DeflateL() function.

Derivation

Members

Defined in CEZFileToGZip:

Inherited from CBase:

Related Topics


Construction and destruction


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

IMPORT_C static 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 TDesC16 &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(RFs &,const TDesC &,RFile &,TInt)

IMPORT_C static 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 TDesC16 &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(RFs &,const TDesC &,RFile &,TInt)

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 TDesC16 &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