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)

voidConstructL(RFs &aRfs,
const TDesC &aGzFileName,
RFile &aInput,
TIntaBufferSize
)[private]

Parameters

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

DeflateL()

IMPORT_C TBoolDeflateL()

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)

voidInitialiseBufManL(RFs &aRfs,
const TDesC &aGzFileName,
RFile &aInput,
TIntaBufferSize
)[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,
TIntaBufferSize = 0x8000
)[static]

Creates a new CEZFileToGZip object and leaves it on the CleanupStack

Parameters

RFs & aRfsopen file server session
const TDesC & aGzFileNamethe name of the target zip file
RFile & aInputthe file to compress
TInt aBufferSize = 0x8000required size of buffers

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

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

Creates a new CEZFileToGZip object and leaves it on the CleanupStack

Parameters

RFs & aRfsopen file server session
const TDesC & aGzFileNamethe name of the target zip file
RFile & aInputthe file to compress
TInt aBufferSize = 0x8000required size of buffers

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

IMPORT_C voidResetL(RFs &aRfs,
const TDesC &aGzFileName,
RFile &aInput,
TIntaBufferSize = 0x8000
)

Quits the current compression operation and restarts with the specified arguments

leave
... Any of the system wide error codes

Parameters

RFs & aRfsopen file server session
const TDesC & aGzFileNamethe name of the target zip file
RFile & aInputthe file to compress
TInt aBufferSize = 0x8000required 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]