#include <BaseLibCompressor.h>
Classes | |
struct | COptions |
Public Member Functions | |
CBaseLibCompressor (CZipStorage *pStorage) | |
void | InitDecompression (CZipFileHeader *pFile, CZipCryptograph *pCryptograph) |
Protected Member Functions | |
void | CheckForError (int iErr) |
void | EmptyPtrList () |
virtual bool | IsCodeErrorOK (int iErr) const =0 |
void | SetOpaque (void **opaque, const COptions *pOptions) |
Static Protected Member Functions | |
static void * | _zipalloc (void *opaque, UINT items, UINT size) |
static void | _zipfree (void *opaque, void *address) |
Protected Attributes | |
bool | m_bDecompressionDone |
Definition at line 39 of file BaseLibCompressor.h.
ZipArchiveLib::CBaseLibCompressor::CBaseLibCompressor | ( | CZipStorage * | pStorage | ) | [inline] |
Initializes a new instance of the CBaseLibCompressor class.
pStorage | The current storage object. |
Definition at line 70 of file BaseLibCompressor.h.
static void* ZipArchiveLib::CBaseLibCompressor::_zipalloc | ( | void * | opaque, | |
UINT | items, | |||
UINT | size | |||
) | [inline, static, protected] |
A memory allocation method called by an external library.
opaque | Internal data. | |
items | The number of blocks to allocate. | |
size | The size of each block to allocate. |
Definition at line 102 of file BaseLibCompressor.h.
static void ZipArchiveLib::CBaseLibCompressor::_zipfree | ( | void * | opaque, | |
void * | address | |||
) | [inline, static, protected] |
A memory deallocation method called by an external library.
opaque | Internal data. | |
address | Memory address to free. |
Definition at line 122 of file BaseLibCompressor.h.
void ZipArchiveLib::CBaseLibCompressor::CheckForError | ( | int | iErr | ) | [inline, protected] |
Checks whether iErr value is an error code and throws an exception if it is.
iErr | The error code. |
Definition at line 158 of file BaseLibCompressor.h.
void ZipArchiveLib::CBaseLibCompressor::EmptyPtrList | ( | ) | [protected] |
Frees the memory allocated by an external library that hasn't been freed due to an error in the library (it should never happen).
void ZipArchiveLib::CBaseLibCompressor::InitDecompression | ( | CZipFileHeader * | pFile, | |
CZipCryptograph * | pCryptograph | |||
) | [inline, virtual] |
The method called when a new file is opened for extraction.
pFile | The file being extracted. | |
pCryptograph | The current CZipCryptograph. It can be NULL , if no decryption is used. |
Reimplemented from CZipCompressor.
Reimplemented in ZipArchiveLib::CDeflateCompressor.
Definition at line 75 of file BaseLibCompressor.h.
virtual bool ZipArchiveLib::CBaseLibCompressor::IsCodeErrorOK | ( | int | iErr | ) | const [protected, pure virtual] |
Checks whether iErr value is an error code.
iErr | The code to check. |
true
, if iErr is an error code; false
otherwise. Implemented in ZipArchiveLib::CDeflateCompressor.
void ZipArchiveLib::CBaseLibCompressor::SetOpaque | ( | void ** | opaque, | |
const COptions * | pOptions | |||
) | [protected] |
Sets an address of internal data used in ZipArchive Library memory allocation and deallocation methods.
opaque | Receives an address of the internal data. | |
pOptions | The current decompressor options. |
bool ZipArchiveLib::CBaseLibCompressor::m_bDecompressionDone [protected] |
Signalizes that the decompression process reached the end of the compressed data. It is internally set by derived classes.
Definition at line 177 of file BaseLibCompressor.h.