CEZFileToGZip Class Reference

#include <ezgzip.h>

Link against: ezlib.lib

class CEZFileToGZip : public CBase

Inherits from

  • CEZFileToGZip

    Detailed 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.

    Constructor & Destructor Documentation

    ~CEZFileToGZip ( )

    ~CEZFileToGZip()

    Member Function Documentation

    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

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

    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

    ParameterDescription
    aRfsopen file server session
    aGzFileNamethe name of the target zip file
    aInputthe file to compress
    aBufferSizerequired size of buffers

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

    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

    ParameterDescription
    aRfsopen file server session
    aGzFileNamethe name of the target zip file
    aInputthe file to compress
    aBufferSizerequired size of buffers

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

    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
    ParameterDescription
    aRfsopen file server session
    aGzFileNamethe name of the target zip file
    aInputthe file to compress
    aBufferSizerequired size of buffers