#include <ZipCompressor.h>
A base class for compressors used in compression and decompression of data.
Array type for storing offset pairs.
The compression level.
The default compression level (translates to 6 for deflate and bzip2 and to ZSTD_CLEVEL_DEFAULT for ZSTD compression).
6
ZSTD_CLEVEL_DEFAULT
No compression used. Data is stored.
The fastest compression. The compression ratio is the lowest (apart from levelStore).
The highest compression ratio. It's usually the slowest one. Note, the maximum number for ZSTD compression is larger than for other compressors (defined by ZSTD_MAX_CLEVEL).
ZSTD_MAX_CLEVEL
The compression method.
A file is stored, not compressed.
The deflate compression method.
The bzip2 compression method.
The Zstandard (zstd) compression method.
This value means that WinZip AES encryption is used. The original compression method is stored in a WinZip extra field. It is only an informational value - you cannot set it as a compression method. The ZipArchive Library handles this value internally.
The type of a compressor.
Deflate compression (default in zip archives).
Bzip2 compression.
PPMd compression.
ZSTD compression.
Initializes a new instance of the CZipCompressor class.
Returns the value indicating whether the current CZipCompressor object supports the given compression method.
true
false
Implemented in ZipArchiveLib::CBzip2Compressor, ZipArchiveLib::CDeflateCompressor, and ZipArchiveLib::CZstdCompressor.
Compresses the given data.
Converts a generic compression level to the compressor's native level.
Converts an internal error code of the compressor to the ZipArchive Library error code.
Reimplemented in ZipArchiveLib::CBzip2Compressor, ZipArchiveLib::CDeflateCompressor, and ZipArchiveLib::CZstdCompressor.
A factory method that creates an appropriate compressor for the given compression method.
Decompresses the given data.
0
Fills the read buffer.
The method called at the end of the compression process.
The method called at the end of the decompression process.
Flushes data in the buffer into the storage, encrypting the data if needed.
Returns the current options of the compressor.
Initializes the internal buffer.
The method called when a new file is opened for compression.
NULL
The method called when a new file is opened for extraction.
Reimplemented in ZipArchiveLib::CBaseLibCompressor, ZipArchiveLib::CBzip2Compressor, ZipArchiveLib::CDeflateCompressor, and ZipArchiveLib::CZstdCompressor.
Returns the value indicating whether the given compression method is supported by the ZipArchive Library.
Prepares the compressor for the seeking operation.
Releases the internal buffer.
Throws an exception with a given error code.
Updates CRC value while decompression.
Updates CRC value while compression.
Updates the current options with the new options.
Updates the current options with the options stored in optionsMap, if the appropriate options are present in the map.
Writes the buffer into the storage, encrypting the data if needed.
A buffer that receives compressed data or provides data for decompression.
The current cryptograph.
The file header being compressed or decompressed.
The current storage object.
The number of bytes left to compress.
The CRC32 file checksum.
The number of bytes left to decompress.