#include <BaseLibCompressor.h>

Classes | |
| struct | COptions |
Public Member Functions | |
| CBaseLibCompressor (CZipStorage *pStorage) | |
| void | InitDecompression (CZipFileHeader *pFile, CZipCryptograph *pCryptograph) |
Public Member Functions inherited from CZipCompressor | |
| virtual bool | CanProcess (WORD uMethod)=0 |
| virtual void | Compress (const void *pBuffer, DWORD uSize)=0 |
| virtual DWORD | Decompress (void *pBuffer, DWORD uSize)=0 |
| virtual void | FinishCompression (bool bAfterException) |
| virtual void | FinishDecompression (bool bAfterException) |
| virtual const COptions * | GetOptions () const |
| virtual void | InitCompression (int iLevel, CZipFileHeader *pFile, CZipCryptograph *pCryptograph) |
| void | UpdateOptions (const COptionsMap &optionsMap) |
Protected Member Functions | |
| void | CheckForError (int iErr) |
| void | EmptyPtrList () |
| virtual bool | IsCodeErrorOK (int iErr) const =0 |
| void | SetOpaque (void **opaque, const COptions *pOptions) |
Protected Member Functions inherited from CZipCompressor | |
| virtual int | ConvertInternalError (int iErr) const |
| CZipCompressor (CZipStorage *pStorage) | |
| DWORD | FillBuffer () |
| void | FlushWriteBuffer () |
| void | InitBuffer () |
| void | ReleaseBuffer () |
| void | ThrowError (int iErr, bool bInternal=false) |
| void | UpdateCrc (const void *pBuffer, DWORD uSize) |
| void | UpdateFileCrc (const void *pBuffer, DWORD uSize) |
| virtual void | UpdateOptions (const COptions *pOptions) |
| void | WriteBuffer (char *pBuffer, DWORD uSize) |
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 |
Protected Attributes inherited from CZipCompressor | |
| CZipAutoBuffer | m_pBuffer |
| A buffer that receives compressed data or provides data for decompression. | |
| CZipCryptograph * | m_pCryptograph |
| The current cryptograph. | |
| CZipFileHeader * | m_pFile |
| The file header being compressed or decompressed. | |
| CZipStorage * | m_pStorage |
| The current storage object. | |
Additional Inherited Members | |
Public Types inherited from CZipCompressor | |
| enum | CompressionLevel { levelDefault = -1, levelStore = 0, levelFastest = 1, levelBest = 9 } |
| enum | CompressionMethod { methodStore = 0, methodDeflate = 8, methodBzip2 = 12, methodWinZipAes = 99 } |
| enum | CompressorType { typeDeflate = 1, typeBzip2, typePPMd } |
Static Public Member Functions inherited from CZipCompressor | |
| static CZipCompressor * | CreateCompressor (WORD uMethod, CZipStorage *pStorage) |
| static bool | IsCompressionSupported (WORD uCompressionMethod) |
Public Attributes inherited from CZipCompressor | |
| ZIP_SIZE_TYPE | m_uComprLeft |
| The number of bytes left to compress. | |
| DWORD | m_uCrc32 |
| The CRC32 file checksum. | |
| ZIP_SIZE_TYPE | m_uUncomprLeft |
| The number of bytes left to decompress. | |
A base class for compressors that use external libraries, such as zlib or bzip2.
Definition at line 39 of file BaseLibCompressor.h.
|
inline |
Initializes a new instance of the CBaseLibCompressor class.
| pStorage | The current storage object. |
Definition at line 70 of file BaseLibCompressor.h.
|
inlinestaticprotected |
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 103 of file BaseLibCompressor.h.
|
inlinestaticprotected |
A memory deallocation method called by an external library.
| opaque | Internal data. |
| address | Memory address to free. |
Definition at line 123 of file BaseLibCompressor.h.
|
inlineprotected |
Checks whether iErr value is an error code and throws an exception if it is.
| iErr | The error code. |
Definition at line 159 of file BaseLibCompressor.h.
|
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).
|
inlinevirtual |
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.
Definition at line 76 of file BaseLibCompressor.h.
|
protectedpure 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.
|
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. |
|
protected |
Signalizes that the decompression process reached the end of the compressed data. It is internally set by derived classes.
Definition at line 178 of file BaseLibCompressor.h.