#include <DeflateCompressor.h>
Classes | |
struct | COptions |
Public Member Functions | |
bool | CanProcess (WORD uMethod) |
CDeflateCompressor (CZipStorage *pStorage) | |
void | Compress (const void *pBuffer, DWORD uSize) |
DWORD | Decompress (void *pBuffer, DWORD uSize) |
void | FinishCompression (bool bAfterException) |
void | FinishDecompression (bool bAfterException) |
const CZipCompressor::COptions * | GetOptions () const |
void | InitCompression (int iLevel, CZipFileHeader *pFile, CZipCryptograph *pCryptograph) |
void | InitDecompression (CZipFileHeader *pFile, CZipCryptograph *pCryptograph) |
![]() | |
CBaseLibCompressor (CZipStorage *pStorage) | |
void | InitDecompression (CZipFileHeader *pFile, CZipCryptograph *pCryptograph) |
![]() | |
void | UpdateOptions (const COptionsMap &optionsMap) |
Protected Member Functions | |
int | ConvertInternalError (int iErr) const |
bool | IsCodeErrorOK (int iErr) const |
void | UpdateOptions (const CZipCompressor::COptions *pOptions) |
![]() | |
void | CheckForError (int iErr) |
void | EmptyPtrList () |
void | SetOpaque (void **opaque, const COptions *pOptions) |
![]() | |
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) |
void | WriteBuffer (char *pBuffer, DWORD uSize) |
Additional Inherited Members | |
![]() | |
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 CZipCompressor * | CreateCompressor (WORD uMethod, CZipStorage *pStorage) |
static bool | IsCompressionSupported (WORD uCompressionMethod) |
![]() | |
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. | |
![]() | |
static void * | _zipalloc (void *opaque, UINT items, UINT size) |
static void | _zipfree (void *opaque, void *address) |
![]() | |
bool | m_bDecompressionDone |
Compresses and decompresses data using the Zlib library.
Definition at line 39 of file DeflateCompressor.h.
ZipArchiveLib::CDeflateCompressor::CDeflateCompressor | ( | CZipStorage * | pStorage | ) |
Initializes a new instance of the CDeflateCompressor class.
pStorage | The current storage object. |
|
inlinevirtual |
Returns the value indicating whether the current CZipCompressor object supports the given compression method.
uMethod | The compression method. It can be one of the CompressionMethod values. |
true
, if the compression method is supported; false
otherwise. Implements CZipCompressor.
Definition at line 84 of file DeflateCompressor.h.
|
virtual |
Compresses the given data.
pBuffer | The buffer that holds the data to compress. |
uSize | The size of pBuffer. |
Implements CZipCompressor.
|
inlineprotectedvirtual |
Converts an internal error code of the compressor to the ZipArchive Library error code.
iErr | An internal error code. |
Reimplemented from CZipCompressor.
Definition at line 110 of file DeflateCompressor.h.
|
virtual |
Decompresses the given data.
pBuffer | The buffer that receives the decompressed data. |
uSize | The size of pBuffer. |
0
.Implements CZipCompressor.
|
virtual |
The method called at the end of the compression process.
bAfterException | Set to true , if an exception occurred before or to false otherwise. |
Reimplemented from CZipCompressor.
|
virtual |
The method called at the end of the decompression process.
bAfterException | Set to true , if an exception occurred before or to false otherwise. |
Reimplemented from CZipCompressor.
|
inlinevirtual |
Returns the current options of the compressor.
Reimplemented from CZipCompressor.
Definition at line 96 of file DeflateCompressor.h.
|
virtual |
The method called when a new file is opened for compression.
iLevel | The compression level. |
pFile | The file being compressed. |
pCryptograph | The current CZipCryptograph. It can be NULL , if no encryption is used. |
Reimplemented from CZipCompressor.
|
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.
|
inlineprotectedvirtual |
Checks whether iErr value is an error code.
iErr | The code to check. |
true
, if iErr is an error code; false
otherwise. Implements ZipArchiveLib::CBaseLibCompressor.
Definition at line 135 of file DeflateCompressor.h.
|
inlineprotectedvirtual |
Updates the current options with the new options.
pOptions | The new options to apply. |
Reimplemented from CZipCompressor.
Definition at line 105 of file DeflateCompressor.h.