Skip Navigation Links
Skip Navigation LinksHome > ZipArchive > How to Use > API Documentation
The ZipArchive Library
CZipCompressor::COffsetsArray Class Reference

#include <ZipCompressor.h>

Inheritance diagram for CZipCompressor::COffsetsArray:
Inheritance graph

Classes

struct  CStat

Public Member Functions

void Clear ()
COffsetsPairFindMax (ZIP_SIZE_TYPE offset, bool uncompressed=true)
COffsetsPairFindMin (ZIP_SIZE_TYPE offset, bool uncompressed=true)
CStat GetStatistics () const
void Load (const CZipAutoBuffer &buffer)
void Save (CZipAutoBuffer &buffer) const

Detailed Description

The array of offsets pairs produced during creating a seekable compressed data.

See also
Creating Seekable Compressed Data
COffsetsPair

Member Function Documentation

◆ Clear()

void CZipCompressor::COffsetsArray::Clear ( )

Removes all elements from the array.

◆ FindMax()

COffsetsPair * CZipCompressor::COffsetsArray::FindMax ( ZIP_SIZE_TYPE offset,
bool uncompressed = true )

Finds the maximum offset not larger than the offset argument.

Parameters
offsetThe maximum offset to look for.
uncompressedtrue to look for the offset in uncompressed data (COffsetsPair::m_uUncompressedOffset); false to look for the offset in compressed data (COffsetsPair::m_uCompressedOffset).
See also
FindMin

◆ FindMin()

COffsetsPair * CZipCompressor::COffsetsArray::FindMin ( ZIP_SIZE_TYPE offset,
bool uncompressed = true )

Finds the minimum offset not smaller than the offset argument.

Parameters
offsetThe minimum offset to look for.
uncompressedtrue to look for the offset in uncompressed data (COffsetsPair::m_uUncompressedOffset); false to look for the offset in compressed data (COffsetsPair::m_uCompressedOffset).
See also
FindMax

◆ GetStatistics()

CStat CZipCompressor::COffsetsArray::GetStatistics ( ) const

Returns the statistics about the blocks in compressed and uncompressed data.

Returns
The CStat object describing statistics.
Note
These values can help you in determining the required synchronization ratio.
See also
Creating Seekable Compressed Data
CStat
COffsetsPair

◆ Load()

void CZipCompressor::COffsetsArray::Load ( const CZipAutoBuffer & buffer)

Loads the previously saved array from the buffer.

Parameters
bufferThe buffer to load the array from.
Note
If the array was saved using 8 bytes offsets, you won't be able to load it with the ZipArchive Library compiled without the Zip64 support.
See also
Creating Seekable Compressed Data
Zip64 Format: Crossing the Limits of File Sizes and Number of Files and Segments
Save

◆ Save()

void CZipCompressor::COffsetsArray::Save ( CZipAutoBuffer & buffer) const

Saves the array into the buffer. If possible, the method uses 4 bytes for offsets, otherwise 8 bytes are used but only when Zip64 is enabled.

Parameters
bufferThe buffer to save the array into.
Note
If the array is saved using 8 bytes offsets, you won't be able to load it with the ZipArchive Library compiled without the Zip64 support.
See also
Creating Seekable Compressed Data
Zip64 Format: Crossing the Limits of File Sizes and Number of Files and Segments
Load

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