Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: 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 DecompressL()) if the buffers are large enough (for example if an input file is mmap'ed), or can be done by repeated calls of the 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:
DecompressL(), EInflateDictionaryError, EInflateInitlialiserError, EInflateTerminated, EInflateVersionError, EMaxWBits, InflateL(), NewL(), NewL(), NewLC(), NewLC(), ResetL(), anonymous, anonymous

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CEZZStream:
Adler32(), AvailIn(), AvailOut(), EBufError, EDataError, EStreamError, EUnexpected, EVersionError, OutputDescriptor(), Progress(), SetInput(), SetOutput(), TotalIn(), TotalOut(), iOutputBufferLength, iOutputPointer, iStream


Construction and destruction


NewLC()

static IMPORT_C 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()

static IMPORT_C 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()

static IMPORT_C 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()

static IMPORT_C 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()

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()

static IMPORT_C 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