Skip Navigation Links
Skip Navigation LinksHome > ZipArchive > How to Use > API Documentation

ZipArchiveLib::CBzip2Compressor Class Reference

#include <Bzip2Compressor.h>

Inheritance diagram for ZipArchiveLib::CBzip2Compressor:

List of all members.


Public Member Functions

bool CanProcess (WORD uMethod)
 CBzip2Compressor (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::COptionsGetOptions () const
void InitCompression (int iLevel, CZipFileHeader *pFile, CZipCryptograph *pCryptograph)
void InitDecompression (CZipFileHeader *pFile, CZipCryptograph *pCryptograph)

Protected Member Functions

int ConvertInternalError (int iErr) const
bool IsCodeErrorOK (int iErr) const
void UpdateOptions (const CZipCompressor::COptions *pOptions)

Classes

struct  COptions

Detailed Description

A compressor that uses the bzip2 algorithm.

See also:
Compressing Data

Constructor & Destructor Documentation

ZipArchiveLib::CBzip2Compressor::CBzip2Compressor ( CZipStorage pStorage  ) 

Initializes a new instance of the CBzip2Compressor class.

Parameters:
pStorage The current storage object.


Member Function Documentation

bool ZipArchiveLib::CBzip2Compressor::CanProcess ( WORD  uMethod  )  [inline, virtual]

Returns the value indicating, if the current CZipCompressor object supports the given compression method.

Parameters:
uMethod The compression method. Can be one of the CompressionMethod values.
Returns:
true, if the compression method is supported; false otherwise.

Implements CZipCompressor.

void ZipArchiveLib::CBzip2Compressor::Compress ( const void *  pBuffer,
DWORD  uSize 
) [virtual]

Compresses the given data.

Parameters:
pBuffer The buffer that holds the data to compress.
uSize The size of pBuffer.
See also:
InitCompression

FinishCompression

Implements CZipCompressor.

int ZipArchiveLib::CBzip2Compressor::ConvertInternalError ( int  iErr  )  const [inline, protected, virtual]

Converts internal error code of the compressor to the ZipArchive Library error code.

Parameters:
iErr An internal error code.
Returns:
A ZipArchive Library error code.

Reimplemented from CZipCompressor.

DWORD ZipArchiveLib::CBzip2Compressor::Decompress ( void *  pBuffer,
DWORD  uSize 
) [virtual]

Decompresses the given data.

Parameters:
pBuffer The buffer that receives the decompressed data.
uSize The size of pBuffer.
Returns:
The number of bytes decompressed and written to pBuffer.
Note:
This method should be called repeatedly until it returns 0.
See also:
InitDecompression

FinishDecompression

Implements CZipCompressor.

void ZipArchiveLib::CBzip2Compressor::FinishCompression ( bool  bAfterException  )  [virtual]

The method called at the end of the compression process.

Parameters:
bAfterException Set to true, if an exception occurred before or to false otherwise.
See also:
InitCompression

Compress

Reimplemented from CZipCompressor.

void ZipArchiveLib::CBzip2Compressor::FinishDecompression ( bool  bAfterException  )  [virtual]

The method called at the end of the decompression process.

Parameters:
bAfterException Set to true, if an exception occurred before or to false otherwise.
See also:
InitDecompression

Decompress

Reimplemented from CZipCompressor.

const CZipCompressor::COptions* ZipArchiveLib::CBzip2Compressor::GetOptions (  )  const [inline, virtual]

Returns the current options of the compressor.

Returns:
The current options for the compressor.
See also:
Compressing Data

CZipArchive::SetCompressionOptions

UpdateOptions

Reimplemented from CZipCompressor.

void ZipArchiveLib::CBzip2Compressor::InitCompression ( int  iLevel,
CZipFileHeader pFile,
CZipCryptograph pCryptograph 
) [virtual]

The method called when a new file is opened for compression.

Parameters:
iLevel The compression level.
pFile The file being compressed.
pCryptograph The current CZipCryptograph. Can be NULL, if no encryption is used.
See also:
Compress

FinishCompression

Reimplemented from CZipCompressor.

void ZipArchiveLib::CBzip2Compressor::InitDecompression ( CZipFileHeader pFile,
CZipCryptograph pCryptograph 
) [virtual]

The method called when a new file is opened for extraction.

Parameters:
pFile The file being extracted.
pCryptograph The current CZipCryptograph. Can be NULL, if no decryption is used.
See also:
Decompress

FinishDecompression

Reimplemented from ZipArchiveLib::CBaseLibCompressor.

bool ZipArchiveLib::CBzip2Compressor::IsCodeErrorOK ( int  iErr  )  const [inline, protected, virtual]

Checks, if iErr value is an error code.

Parameters:
iErr The code to check.
Returns:
true, if iErr is an error code; false otherwise.

Implements ZipArchiveLib::CBaseLibCompressor.

void ZipArchiveLib::CBzip2Compressor::UpdateOptions ( const CZipCompressor::COptions pOptions  )  [inline, protected, virtual]

Updates the current options with the new options.

Parameters:
pOptions The new options to apply.

Reimplemented from CZipCompressor.


The documentation for this class was generated from the following file:
Back To Top Up