TUnicodeCompressor Class Reference

#include <s32ucmp.h>

class TUnicodeCompressor : public TUnicodeCompressionState

Inherits from

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

Constructor & Destructor Documentation

TUnicodeCompressor ( )

IMPORT_CTUnicodeCompressor()

Member Function Documentation

CompressL ( RWriteStream &, MUnicodeSource &, TInt, TInt, TInt *, TInt * )

IMPORT_C voidCompressL(RWriteStream &aOutput,
MUnicodeSource &aInput,
TIntaMaxOutputBytes =  KMaxTInt ,
TIntaMaxInputWords =  KMaxTInt ,
TInt *aOutputBytes = NULL,
TInt *aInputWords = NULL
)

CompressL ( TUint8 *, MUnicodeSource &, TInt, TInt, TInt *, TInt * )

IMPORT_C voidCompressL(TUint8 *aOutput,
MUnicodeSource &aInput,
TIntaMaxOutputBytes =  KMaxTInt ,
TIntaMaxInputWords =  KMaxTInt ,
TInt *aOutputBytes = NULL,
TInt *aInputWords = NULL
)

CompressedSizeL ( MUnicodeSource &, TInt )

IMPORT_C TIntCompressedSizeL(MUnicodeSource &aInput,
TIntaInputWords
)[static]

FlushL ( RWriteStream &, TInt, TInt & )

IMPORT_C TIntFlushL(RWriteStream &aOutput,
TIntaMaxOutputBytes,
TInt &aOutputBytes
)

FlushL ( TUint8 *, TInt, TInt & )

IMPORT_C TIntFlushL(TUint8 *aOutput,
TIntaMaxOutputBytes,
TInt &aOutputBytes
)