Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cZipDir Class Reference

#include <cZipDir.h>

Inheritance diagram for GrayLib::cZipDir:
GrayLib::cZipData

Public Member Functions

 cZipDir ()
 
 ~cZipDir ()
 
bool isValidParams () const
 
HRESULT ReadHeader (cStreamInput &s)
 
HRESULT WriteHeader (cStreamOutput &s)
 
HRESULT SeekZipDir (cStreamInput &s)
 
HRESULT ReadZipDir (cStreamInput &s)
 
STREAM_OFFSET_t get_PosLH0 () const
 
STREAM_OFFSET_t get_PosCH0 () const
 
size_t get_SizeCHD () const
 
int get_FileCount () const
 

Public Attributes

STREAM_OFFSET_t m_nPosZipDir
 The absolute position of 'this' block in the .ZIP file. it can float from start. is relative to end of file. More...
 
WORD m_nNumDisk
 number of the current disk, used for spanning ZIP, unsupported, always 0 More...
 
WORD m_nNumDisk_CD
 number the the disk with central directory, used for spanning ZIP, unsupported, always 0 More...
 
WORD m_nNumberOfEntries
 total number of entries/files in the central directory on this disk More...
 
WORD m_nNumberOfEntries_CD
 total number of entries/files in the central directory More...
 
UINT32 m_nSizeCentralDir
 size of the entire central directory (all entries, not data). bytes More...
 
ZIP_SIZE_t m_nSizeLocalDir
 size of the local directory + all compressed file data. bytes More...
 
cString m_sGlobalComment
 comment Has WORD prefix for length. More...
 

Additional Inherited Members

- Protected Types inherited from GrayLib::cZipData
enum  COMPMETHOD_TYPE {
  COMPMETHOD_Store = 0 , COMPMETHOD_OLD_SHRINK , COMPMETHOD_OLD_REDUCE1 , COMPMETHOD_OLD_REDUCE2 ,
  COMPMETHOD_OLD_REDUCE3 , COMPMETHOD_OLD_REDUCE4 , COMPMETHOD_OLD_IMPLODE , COMPMETHOD_OLD_TOKENIZE ,
  COMPMETHOD_Deflate = 8 , COMPMETHOD_Deflate64 = 9 , COMPMETHOD_BZIP2 = 12 , COMPMETHOD_JPEG = 96 ,
  COMPMETHOD_WavPack = 97 , COMPMETHOD_PPMd = 98
}
 
- Static Protected Member Functions inherited from GrayLib::cZipData
static HRESULT GRAYCALL ReadU16 (cStreamInput &stmIn, WORD *pX)
 
static HRESULT GRAYCALL ReadU32 (cStreamInput &stmIn, UINT32 *pX)
 
static HRESULT WriteU16 (cStreamOutput &s, WORD x)
 
static HRESULT WriteU32 (cStreamOutput &s, UINT32 x)
 

Detailed Description

The main directory header end block. "Central Directory" the header block after ZIP_MAGIC_DIREND (one per .zip file) everything in a ZIP file is positioned relative to this block in the file. http://www.pkware.com/documents/casestudies/APPNOTE.TXT

Constructor & Destructor Documentation

◆ cZipDir()

GrayLib::cZipDir::cZipDir ( )

◆ ~cZipDir()

GrayLib::cZipDir::~cZipDir ( )

Member Function Documentation

◆ get_FileCount()

int GrayLib::cZipDir::get_FileCount ( ) const
inline

◆ get_PosCH0()

STREAM_OFFSET_t GrayLib::cZipDir::get_PosCH0 ( ) const
inline

get the absolute position of the first central header. cZipFileEntry1

◆ get_PosLH0()

STREAM_OFFSET_t GrayLib::cZipDir::get_PosLH0 ( ) const
inline

get the absolute position of the first local header. cZipFileEntry0 most times it is 0, but it can float relative to the CH directory block. ZIP_MAGIC_DIREND

◆ get_SizeCHD()

size_t GrayLib::cZipDir::get_SizeCHD ( ) const
inline

get true size of this in "Central Header". includes magic number.

◆ isValidParams()

bool GrayLib::cZipDir::isValidParams ( ) const

◆ ReadHeader()

HRESULT GrayLib::cZipDir::ReadHeader ( cStreamInput s)

◆ ReadZipDir()

HRESULT GrayLib::cZipDir::ReadZipDir ( cStreamInput s)

◆ SeekZipDir()

HRESULT GrayLib::cZipDir::SeekZipDir ( cStreamInput s)

◆ WriteHeader()

HRESULT GrayLib::cZipDir::WriteHeader ( cStreamOutput s)

Member Data Documentation

◆ m_nNumberOfEntries

WORD GrayLib::cZipDir::m_nNumberOfEntries

total number of entries/files in the central directory on this disk

◆ m_nNumberOfEntries_CD

WORD GrayLib::cZipDir::m_nNumberOfEntries_CD

total number of entries/files in the central directory

◆ m_nNumDisk

WORD GrayLib::cZipDir::m_nNumDisk

number of the current disk, used for spanning ZIP, unsupported, always 0

◆ m_nNumDisk_CD

WORD GrayLib::cZipDir::m_nNumDisk_CD

number the the disk with central directory, used for spanning ZIP, unsupported, always 0

◆ m_nPosZipDir

STREAM_OFFSET_t GrayLib::cZipDir::m_nPosZipDir

The absolute position of 'this' block in the .ZIP file. it can float from start. is relative to end of file.

◆ m_nSizeCentralDir

UINT32 GrayLib::cZipDir::m_nSizeCentralDir

size of the entire central directory (all entries, not data). bytes

◆ m_nSizeLocalDir

ZIP_SIZE_t GrayLib::cZipDir::m_nSizeLocalDir

size of the local directory + all compressed file data. bytes

◆ m_sGlobalComment

cString GrayLib::cZipDir::m_sGlobalComment

comment Has WORD prefix for length.


The documentation for this class was generated from the following file: