#include <ezdecompressor.h>
class CEZDecompressor : public CEZZStream |
Public Member Enumerations | |
---|---|
enum | anonymous { EInflateInitlialiserError, EInflateVersionError, EInflateTerminated, EInflateDictionaryError } |
enum | anonymous { EMaxWBits } |
Public Member Functions | |
---|---|
~CEZDecompressor() | |
IMPORT_C void | DecompressL(TDes8 &, const TDesC8 &) |
IMPORT_C TBool | InflateL() |
IMPORT_C CEZDecompressor * | NewL(MEZBufferManager &, TInt) |
IMPORT_C CEZDecompressor * | NewL(MEZBufferManager &, const TDesC8 &, TInt) |
IMPORT_C CEZDecompressor * | NewLC(MEZBufferManager &, TInt) |
IMPORT_C CEZDecompressor * | NewLC(MEZBufferManager &, const TDesC8 &, TInt) |
IMPORT_C void | ResetL(MEZBufferManager &) |
Inherited Attributes | |
---|---|
CEZZStream::iOutputBufferLength | |
CEZZStream::iOutputPointer | |
CEZZStream::iStream |
Inherited Enumerations | |
---|---|
CEZZStream:@38 |
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).
Note: In this version of the library a windowBits value of 8 is unsupported due to a problem with the window size being set to 256 bytes. Although a value of 8 will be accepted by the CEZCompressor constructors, as it is being changed internally by Zlib from 8 to 9, it will not be possible to use the same value for decompression. This is because the Zlib functions called by the CEZDecompressor constructors do not make the same change internally and as a result a KEZlibErrData is returned when calling InflateL(). It is therefore advised that for this version of the library windowBits of 9 is used in place of 8.
Decompression panic values
Enumerator | Value | Description |
---|---|---|
EInflateInitlialiserError | EUnexpected + 1 | |
EInflateVersionError | ||
EInflateTerminated | ||
EInflateDictionaryError |
Window Bits - the base two logarithm of the window size (the size of the history buffer)
Enumerator | Value | Description |
---|---|---|
EMaxWBits | MAX_WBITS |
~CEZDecompressor | ( | ) |
De-compresses the data in the given buffer
Parameters | |
---|---|
aDestination | the target buffer for the de-compressed data |
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 |
IMPORT_C TBool | InflateL | ( | ) |
De-compress the data to the buffer in stages, return value indicates if the de-compression has finalised or if further calls are necessary
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 |
IMPORT_C CEZDecompressor * | NewL | ( | MEZBufferManager & | aInit, |
TInt | aWindowBits = EMaxWBits | |||
) | [static] |
Creates a new CEZDecompressor object
Parameters | |
---|---|
aInit | buffer manager to handle both input and output buffers |
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. |
IMPORT_C CEZDecompressor * | NewL | ( | MEZBufferManager & | aInit, |
const TDesC8 & | aDictionary, | |||
TInt | aWindowBits = EMaxWBits | |||
) | [static] |
Overload of CEZDecompressor constructor takes aDictionary argument
Parameters | |
---|---|
aInit | buffer manager to handle both input and output buffers |
aDictionary | used to initialize the de-compression dictionary from the given byte sequence. The compressor and decompressor must use exactly the same dictionary. |
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. |
IMPORT_C CEZDecompressor * | NewLC | ( | MEZBufferManager & | aInit, |
TInt | aWindowBits = EMaxWBits | |||
) | [static] |
Creates a new CEZDecompressor object and leaves it on the CleanupStack
Parameters | |
---|---|
aInit | buffer manager to handle both input and output buffers |
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. |
IMPORT_C CEZDecompressor * | NewLC | ( | MEZBufferManager & | aInit, |
const TDesC8 & | aDictionary, | |||
TInt | aWindowBits = EMaxWBits | |||
) | [static] |
Overload of CEZDecompressor constructor takes aDictionary argument
Parameters | |
---|---|
aInit | buffer manager to handle both input and output buffers |
aDictionary | used to initialize the de-compression dictionary from the given byte sequence. The compressor and decompressor must use exactly the same dictionary. |
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. |
IMPORT_C void | ResetL | ( | MEZBufferManager & | aInit | ) |
Resets the current de-compression operation, with the new buffer manager
Parameters | |
---|---|
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 |