Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: S32UCMP.H
Link against: estor.lib

Class TUnicodeCompressor

class TUnicodeCompressor : public TUnicodeCompressionState;

Description

A class to hold functions to compress text using the Standard Compression Scheme for Unicode.

A note on error handling and leaving.

Although all the public functions except the constructor can leave, it is possible to guarantee success: that is, guarantee that a call will not leave, and that compression will be completed. To do this, (i) supply a MUnicodeSource object with a non-leaving ReadUnicodeValueL function, such as a TMemoryUnicodeSource; (ii) write output to a RWriteStream with a non-leaving WriteL function, or to a buffer that you already know to be big enough, which can be found out using CompressedSizeL.

This guarantee of success is particularly useful when compressing from one memory buffer to another.

Derivation

Members

Defined in TUnicodeCompressor:
CompressL(), CompressL(), CompressedSizeL(), FlushL(), FlushL(), TUnicodeCompressor()

Inherited from TUnicodeCompressionState:
EDynamicWindows, ENotUnicode, EOutputBufferOverflow, ESpecialBases, EStaticWindows, EUnhandledByte, TPanic, anonymous, iActiveWindowBase, iCompressedBytes, iDynamicWindow, iDynamicWindowDefault, iMaxCompressedBytes, iMaxUnicodeWords, iSpecialBase, iStaticWindow, iUnicodeMode, iUnicodeWords


Construction and destruction


TUnicodeCompressor()

IMPORT_C TUnicodeCompressor();

Description

[Top]


Member functions


CompressL()

IMPORT_C void CompressL(RWriteStream &aOutput, MUnicodeSource &aInput, TInt aMaxOutputBytes=KMaxTInt, TInt aMaxInputWords=KMaxTInt, TInt *aOutputBytes=0,TInt *aInputWords=0);

Description

Parameters

RWriteStream &aOutput

MUnicodeSource &aInput

TInt aMaxOutputBytes

TInt aMaxInputWords

TInt *aOutputBytes

TInt *aInputWords


CompressL()

IMPORT_C void CompressL(TUint8 *aOutput, MUnicodeSource &aInput, TInt aMaxOutputBytes=KMaxTInt, TInt aMaxInputWords=KMaxTInt, TInt *aOutputBytes=0,TInt *aInputWords=0);

Description

Parameters

TUint8 *aOutput

MUnicodeSource &aInput

TInt aMaxOutputBytes

TInt aMaxInputWords

TInt *aOutputBytes

TInt *aInputWords


FlushL()

IMPORT_C TInt FlushL(RWriteStream &aOutput, TInt aMaxOutputBytes, TInt &aOutputBytes);

Description

Parameters

RWriteStream &aOutput

TInt aMaxOutputBytes

TInt &aOutputBytes

Return value

TInt


FlushL()

IMPORT_C TInt FlushL(TUint8 *aOutput, TInt aMaxOutputBytes, TInt &aOutputBytes);

Description

Parameters

TUint8 *aOutput

TInt aMaxOutputBytes

TInt &aOutputBytes

Return value

TInt


CompressedSizeL()

static IMPORT_C TInt CompressedSizeL(MUnicodeSource &aInput, TInt aInputWords);

Description

Parameters

MUnicodeSource &aInput

TInt aInputWords

Return value

TInt