CEZGZipToFile Class Reference

#include <ezgzip.h>

Link against: ezlib.lib

class CEZGZipToFile : public CBase

Inherits from

Detailed 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 InflateL() function.

Constructor & Destructor Documentation

~CEZGZipToFile ( )

~CEZGZipToFile()

Member Function Documentation

InflateL ( )

IMPORT_C TBoolInflateL()

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
ETrue if the de-compression is not complete, and function must be called again EFalse if the de-compression is finalised
Leave Codes
KEZlibErrBadGZipCrcInvalid CRC check
...Any of the system wide error codes

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

IMPORT_C CEZGZipToFile *NewL(RFs &aRfs,
const TDesC &aGzFileName,
RFile &aOutput,
TIntaBufferSize = 0x8000
)[static]

Creates a new CEZGZipToFile object

Parameters
aRfsopen file server session
aGzFileNamename of the file to be de-compressed
aOutputthe target file to hold the un-compressed data
aBufferSizerequired size of buffers
Return Value
a pointer to the new CEZGZipToFile object

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

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

Creates a new CEZGZipToFile object and leaves it on the CleanupStack

Parameters
aRfsopen file server session
aGzFileNamename of the file to be de-compressed
aOutputthe target file to hold the un-compressed data
aBufferSizerequired size of buffers
Return Value
a pointer to the new CEZGZipToFile object, left on the CleanupStack

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

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

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

Parameters
aRfsopen file server session
aGzFileNamename of the file to be de-compressed
aOutputthe target file to hold the un-compressed data
aBufferSizerequired size of buffers
Leave Codes
...Any of the system wide error codes