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

#include <ZipExtraData.h>

Public Member Functions

 CZipExtraData (const CZipExtraData &extra)
 CZipExtraData (WORD uHeaderID)
WORD GetHeaderID () const
int GetTotalSize () const
bool operator!= (const CZipExtraData &extra)
bool operator< (const CZipExtraData &extra)
bool operator<= (const CZipExtraData &extra)
CZipExtraDataoperator= (const CZipExtraData &extra)
bool operator== (const CZipExtraData &extra)
bool operator> (const CZipExtraData &extra)
bool operator>= (const CZipExtraData &extra)

Public Attributes

bool m_bHasSize
CZipAutoBuffer m_data

Protected Member Functions

bool Read (char *buffer, WORD uSize)
WORD Write (char *buffer) const

Friends

class CZipExtraField

Detailed Description

Represents a single data record in an extra field.

See also
Providing Custom Data: Extra Fields

Constructor & Destructor Documentation

◆ CZipExtraData() [1/2]

CZipExtraData::CZipExtraData ( const CZipExtraData & extra)
inline

Copy constructor.

Parameters
extraThe extra data to copy from.

◆ CZipExtraData() [2/2]

CZipExtraData::CZipExtraData ( WORD uHeaderID)
inline

Initializes a new instance of the CZipExtraData class.

Parameters
uHeaderIDThe unique ID of the data.

Member Function Documentation

◆ GetHeaderID()

WORD CZipExtraData::GetHeaderID ( ) const
inline

Returns the data ID.

Returns
The data ID.

◆ GetTotalSize()

int CZipExtraData::GetTotalSize ( ) const
inline

Returns the total size the extra data will occupy in the archive.

Returns
The size in bytes.

◆ operator!=()

bool CZipExtraData::operator!= ( const CZipExtraData & extra)
inline

Inequality operator.

Parameters
extraThe extra data to compare with.
Returns
true if not equal; false otherwise.

◆ operator<()

bool CZipExtraData::operator< ( const CZipExtraData & extra)
inline

Less than operator.

Parameters
extraThe extra data to compare with.
Returns
true if this header ID is less; false otherwise.

◆ operator<=()

bool CZipExtraData::operator<= ( const CZipExtraData & extra)
inline

Less than or equal operator.

Parameters
extraThe extra data to compare with.
Returns
true if this header ID is less or equal; false otherwise.

◆ operator=()

CZipExtraData & CZipExtraData::operator= ( const CZipExtraData & extra)
inline

Assignment operator.

Parameters
extraThe extra data to copy from.
Returns
Reference to this object.

◆ operator==()

bool CZipExtraData::operator== ( const CZipExtraData & extra)
inline

Equality operator.

Parameters
extraThe extra data to compare with.
Returns
true if equal; false otherwise.

◆ operator>()

bool CZipExtraData::operator> ( const CZipExtraData & extra)
inline

Greater than operator.

Parameters
extraThe extra data to compare with.
Returns
true if this header ID is greater; false otherwise.

◆ operator>=()

bool CZipExtraData::operator>= ( const CZipExtraData & extra)
inline

Greater than or equal operator.

Parameters
extraThe extra data to compare with.
Returns
true if this header ID is greater or equal; false otherwise.

◆ Read()

bool CZipExtraData::Read ( char * buffer,
WORD uSize )
protected

Reads the extra data record from buffer.

Parameters
bufferThe buffer to read the data from.
uSizeThe size of the data to read.
Returns
false, if uSize was smaller than the declared extra data size; true otherwise.

◆ Write()

WORD CZipExtraData::Write ( char * buffer) const
protected

Writes the extra data record to buffer.

Parameters
bufferThe buffer to write to.
Returns
The total size of extra data in bytes.

Member Data Documentation

◆ m_bHasSize

bool CZipExtraData::m_bHasSize

If true, the size of the extra data record is read from the archive and written to it. This is default behavior consistent with the common ZIP format. If false, the size is not read or written. You should change this value only when you need special handling.

◆ m_data

CZipAutoBuffer CZipExtraData::m_data

The custom data contained by this record.


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