Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <EZDecompressor.h>
Link against: ezlib.lib

Class CEZDecompressor

class CEZDecompressor : public CEZZStream;

Description

The CEZDecompressor class provides in-memory de-compression functions, including integrity checks of the compressed data. This version of the library supports only one compression / de-compression method (deflation / inflation). De-compression can be done in a single step (using CEZDecompressor::DecompressL(TDes8 &,const TDesC8 &)) if the buffers are large enough (for example if an input file is mmap'ed), or can be done by repeated calls of the CEZDecompressor::InflateL() function. The source data is de-compressed to the target buffer (both source and target contained within the buffer manager argument).

Derivation

Members

Defined in CEZDecompressor:

Inherited from CBase:

Inherited from CEZZStream:


Construction and destruction


NewLC(MEZBufferManager &,TInt)

IMPORT_C static CEZDecompressor* NewLC(MEZBufferManager &aInit, TInt aWindowBits=EMaxWBits);

Description

Creates a new CEZDecompressor object and leaves it on the CleanupStack

Parameters

MEZBufferManager &aInit

buffer manager to handle both input and output buffers

TInt aWindowBits

the base two logarithm of the window size (the size of the history buffer). It should be in the range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage.

Return value

CEZDecompressor *

the new CEZDecompressor object (on the CleanupStack)


NewL(MEZBufferManager &,TInt)

IMPORT_C static CEZDecompressor* NewL(MEZBufferManager &aInit, TInt aWindowBits=EMaxWBits);

Description

Creates a new CEZDecompressor object

Parameters

MEZBufferManager &aInit

buffer manager to handle both input and output buffers

TInt aWindowBits

the base two logarithm of the window size (the size of the history buffer). It should be in the range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage.

Return value

CEZDecompressor *

the new CEZDecompressor object


NewLC(MEZBufferManager &,const TDesC8 &,TInt)

IMPORT_C static CEZDecompressor* NewLC(MEZBufferManager &aInit, const TDesC8 &aDictionary, TInt aWindowBits=EMaxWBits);

Description

Overload of CEZDecompressor constructor takes aDictionary argument

Parameters

MEZBufferManager &aInit

buffer manager to handle both input and output buffers

const TDesC8 &aDictionary

used to initialize the de-compression dictionary from the given byte sequence. The compressor and decompressor must use exactly the same dictionary.

TInt aWindowBits

the base two logarithm of the window size (the size of the history buffer). It should be in the range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage.

Return value

CEZDecompressor *

the new CEZDecompressor object (on the CleanupStack)


NewL(MEZBufferManager &,const TDesC8 &,TInt)

IMPORT_C static CEZDecompressor* NewL(MEZBufferManager &aInit, const TDesC8 &aDictionary, TInt aWindowBits=EMaxWBits);

Description

Overload of CEZDecompressor constructor takes aDictionary argument

Parameters

MEZBufferManager &aInit

buffer manager to handle both input and output buffers

const TDesC8 &aDictionary

used to initialize the de-compression dictionary from the given byte sequence. The compressor and decompressor must use exactly the same dictionary.

TInt aWindowBits

the base two logarithm of the window size (the size of the history buffer). It should be in the range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage.

Return value

CEZDecompressor *

the new CEZDecompressor object

[Top]


Member functions


ResetL(MEZBufferManager &)

IMPORT_C void ResetL(MEZBufferManager &aInit);

Description

Resets the current de-compression operation, with the new buffer manager

Parameters

MEZBufferManager &aInit

new buffer manager to handle the new input and output buffers

Leave codes

KEZlibErrStream

There is a problem with the stream

...

Any of the System wide error codes


InflateL()

IMPORT_C TBool InflateL();

Description

De-compress the data to the buffer in stages, return value indicates if the de-compression has finalised or if further calls are necessary

Return value

TBool

ETrue if the function must be called again, EFalse if compression is finalised

Leave codes

KEZlibErrStream

There is a problem with the stream

KEZlibErrBuf

There is a problem with the buffer

KEZlibErrData

There is a problem with the data

KEZlibErrUnexpected

Unexpected programming error

...

Any of the System wide error codes


DecompressL(TDes8 &,const TDesC8 &)

IMPORT_C static void DecompressL(TDes8 &aDestination, const TDesC8 &aSource);

Description

De-compresses the data in the given buffer

Parameters

TDes8 &aDestination

the target buffer for the de-compressed data

const TDesC8 &aSource

the buffer containing the compressed data

Leave codes

KEZLibErrBuf

There is a problem with the buffer

KEZLIbErrData

There is a problem with the data

...

Any of the system wide error codes

[Top]


Member enumerations


Enum anonymous

n/a

Description

Decompression panic values

EInflateInitlialiserError

EInflateVersionError

EInflateTerminated

EInflateDictionaryError


Enum anonymous

n/a

Description

Window Bits - the base two logarithm of the window size (the size of the history buffer)

EMaxWBits