CEZFileToGZip Class Reference

class CEZFileToGZip : public CBase

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.

Inherits from

Constructor & Destructor Documentation

CEZFileToGZip()

CEZFileToGZip ( ) [private]

~CEZFileToGZip()

~CEZFileToGZip ( )

Member Functions Documentation

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

void ConstructL ( RFs & aRfs,
const TDesC & aGzFileName,
RFile & aInput,
TInt aBufferSize
) [private]

Parameters

RFs & aRfs
const TDesC & aGzFileName
RFile & aInput
TInt aBufferSize

DeflateL()

IMPORT_C TBool DeflateL ( )

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
	}
        
leave
... Any of the system wide error codes

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

void InitialiseBufManL ( RFs & aRfs,
const TDesC & aGzFileName,
RFile & aInput,
TInt aBufferSize
) [private]

Parameters

RFs & aRfs
const TDesC & aGzFileName
RFile & aInput
TInt aBufferSize

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

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

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 = 0x8000 required size of buffers

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

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

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 = 0x8000 required size of buffers

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

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

Quits the current compression operation and restarts with the specified arguments

leave
... Any of the system wide error codes

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 = 0x8000 required size of buffers

Member Data Documentation

CEZFileToGzipBM * iBufferManager

CEZFileToGzipBM * iBufferManager [private]

CEZCompressor * iCompressor

CEZCompressor * iCompressor [private]

RFile iGZipFile

RFile iGZipFile [private]

TEZGZipHeader iHeader

TEZGZipHeader iHeader [private]

TInt iUncompressedDataSize

TInt iUncompressedDataSize [private]