class TUnicodeCompressor : public TUnicodeCompressionState |
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.
Public Member Functions | |
---|---|
TUnicodeCompressor() | |
IMPORT_C void | CompressL(RWriteStream &, MUnicodeSource &, TInt, TInt, TInt *, TInt *) |
IMPORT_C void | CompressL(TUint8 *, MUnicodeSource &, TInt, TInt, TInt *, TInt *) |
IMPORT_C TInt | CompressedSizeL(MUnicodeSource &, TInt) |
IMPORT_C TInt | FlushL(RWriteStream &, TInt, TInt &) |
IMPORT_C TInt | FlushL(TUint8 *, TInt, TInt &) |
Private Member Functions | |
---|---|
void | DoCompressL(RWriteStream *, TUint8 *, MUnicodeSource *, TInt, TInt, TInt *, TInt *) |
void | FlushInputBufferL() |
void | FlushOutputBufferL() |
void | SelectTreatment(TInt) |
void | WriteByte(TUint) |
void | WriteCharacter(const TAction &) |
void | WriteCharacterFromBuffer() |
void | WriteRunL() |
void | WriteSCharacter(const TAction &) |
void | WriteUCharacter(TUint16) |
Private Member Enumerations | |
---|---|
enum | anonymous { EMaxInputBufferSize = 4, EMaxOutputBufferSize = EMaxInputBufferSize * 3 } |
Inherited Enumerations | |
---|---|
TUnicodeCompressionState:@47 | |
TUnicodeCompressionState:TPanic |
IMPORT_C void | CompressL | ( | RWriteStream & | aOutput, |
MUnicodeSource & | aInput, | |||
TInt | aMaxOutputBytes = KMaxTInt , | |||
TInt | aMaxInputWords = KMaxTInt , | |||
TInt * | aOutputBytes = NULL, | |||
TInt * | aInputWords = NULL | |||
) |
RWriteStream & aOutput | |
MUnicodeSource & aInput | |
TInt aMaxOutputBytes = KMaxTInt | |
TInt aMaxInputWords = KMaxTInt | |
TInt * aOutputBytes = NULL | |
TInt * aInputWords = NULL |
IMPORT_C void | CompressL | ( | TUint8 * | aOutput, |
MUnicodeSource & | aInput, | |||
TInt | aMaxOutputBytes = KMaxTInt , | |||
TInt | aMaxInputWords = KMaxTInt , | |||
TInt * | aOutputBytes = NULL, | |||
TInt * | aInputWords = NULL | |||
) |
IMPORT_C TInt | CompressedSizeL | ( | MUnicodeSource & | aInput, |
TInt | aInputWords | |||
) | [static] |
MUnicodeSource & aInput | |
TInt aInputWords |
void | DoCompressL | ( | RWriteStream * | aOutputStream, |
TUint8 * | aOutputPointer, | |||
MUnicodeSource * | aInput, | |||
TInt | aMaxCompressedBytes, | |||
TInt | aMaxUnicodeWords, | |||
TInt * | aCompressedBytes, | |||
TInt * | aUnicodeWords | |||
) | [private] |
RWriteStream * aOutputStream | |
TUint8 * aOutputPointer | |
MUnicodeSource * aInput | |
TInt aMaxCompressedBytes | |
TInt aMaxUnicodeWords | |
TInt * aCompressedBytes | |
TInt * aUnicodeWords |
IMPORT_C TInt | FlushL | ( | RWriteStream & | aOutput, |
TInt | aMaxOutputBytes, | |||
TInt & | aOutputBytes | |||
) |
RWriteStream & aOutput | |
TInt aMaxOutputBytes | |
TInt & aOutputBytes |
IMPORT_C TInt | FlushL | ( | TUint8 * | aOutput, |
TInt | aMaxOutputBytes, | |||
TInt & | aOutputBytes | |||
) |
void | WriteCharacter | ( | const TAction & | aAction | ) | [private] |
const TAction & aAction |
void | WriteSCharacter | ( | const TAction & | aAction | ) | [private] |
const TAction & aAction |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.