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

CZipCompressor::COffsetsArray Class Reference

#include <ZipCompressor.h>

List of all members.


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

Classes

struct  CStat

Detailed Description

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

See also:
Creating Seekable Compressed Data

COffsetsPair


Member Function Documentation

void CZipCompressor::COffsetsArray::Clear (  ) 

Removes all elements from the array.

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

Finds the maximum offset not larger than the offset argument.

Parameters:
offset The maximum offset to look for.
uncompressed true 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

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

Finds the minimum offset not smaller than the offset argument.

Parameters:
offset The minimum offset to look for.
uncompressed true 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

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

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

Loads the previously saved array from the buffer.

Parameters:
buffer The 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

Save

Zip64 Format: Crossing the Limits of File Sizes and Number of Files and Segments

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:
buffer The 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

Load

Zip64 Format: Crossing the Limits of File Sizes and Number of Files and Segments


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