Represents a zip archive file.
|
Public Types |
| enum | CloseAfterException { afNoException,
afAfterException,
afWriteDir
} |
| enum | ConsistencyCheck {
checkNone,
checkCRC = 0x0001,
checkLocalMethod = 0x0002,
checkLocalSizes = 0x0004,
checkLocalCRC = 0x0008,
checkLocalFlag = 0x0010,
checkLocalAll = checkLocalMethod | checkLocalSizes | checkLocalCRC | checkLocalFlag,
checkDataDescriptor = 0x0100,
checkAll = checkCRC | checkLocalAll | checkDataDescriptor,
checkIgnoredByDefault = checkDataDescriptor
} |
| enum | FFCaseSens { ffDefault,
ffCaseSens,
ffNoCaseSens
} |
| enum | OpenMode {
zipOpen,
zipOpenReadOnly,
zipCreate,
zipCreateSegm,
zipCreateAppend
} |
| enum | Predict { prDir,
prFile,
prAuto
} |
| enum | SegmCallbackType { scSpan = 0x01,
scSplit = 0x02,
scAll = scSpan | scSplit
} |
| enum | Smartness {
zipsmLazy = 0x0000,
zipsmCPassDir = 0x0001,
zipsmCPFile0 = 0x0002,
zipsmNotCompSmall = 0x0004,
zipsmCheckForEff = 0x0008,
zipsmMemoryFlag = 0x0010,
zipsmCheckForEffInMem = zipsmMemoryFlag | zipsmCheckForEff,
zipsmSmartPass = zipsmCPassDir | zipsmCPFile0,
zipsmSmartAdd = zipsmNotCompSmall | zipsmCheckForEff,
zipsmSafeSmart = zipsmSmartPass | zipsmNotCompSmall,
zipsmSmartest = zipsmSmartPass | zipsmSmartAdd,
zipsmInternal01 = 0xf000
} |
Public Member Functions |
| bool | AddNewFile (CZipMemFile &mf, LPCTSTR lpszFileNameInZip, int iComprLevel=-1, int iSmartLevel=zipsmSafeSmart, unsigned long nBufSize=65536) |
| bool | AddNewFile (LPCTSTR lpszFilePath, LPCTSTR lpszFileNameInZip, int iComprLevel=-1, int iSmartLevel=zipsmSafeSmart, unsigned long nBufSize=65536) |
| bool | AddNewFile (LPCTSTR lpszFilePath, int iComprLevel=-1, bool bFullPath=true, int iSmartLevel=zipsmSafeSmart, unsigned long nBufSize=65536) |
| bool | AddNewFile (CZipAddNewFileInfo &info) |
| bool | AddNewFiles (LPCTSTR lpszPath, LPCTSTR lpszFileMask=_T("*.*"), bool bRecursive=true, int iComprLevel=-1, bool bSkipInitialPath=true, int iSmartLevel=zipsmSafeSmart, unsigned long nBufSize=65536) |
| bool | AddNewFiles (LPCTSTR lpszPath, ZipArchiveLib::CFileFilter &filter, bool bRecursive=true, int iComprLevel=-1, bool bSkipInitialPath=true, int iSmartLevel=zipsmSafeSmart, unsigned long nBufSize=65536) |
| void | Close (int iAfterException=afNoException, bool bUpdateTimeStamp=false) |
| int | CloseFile (CZipFile &file) |
| int | CloseFile (LPCTSTR lpszFilePath=NULL, bool bAfterException=false) |
| bool | CloseNewFile (bool bAfterException=false) |
| void | EnableFindFast (bool bEnable=true) |
| bool | EncryptAllFiles () |
| bool | EncryptFile (ZIP_INDEX_TYPE uIndex) |
| bool | EncryptFiles (CZipIndexesArray &aIndexes) |
| bool | ExtractFile (ZIP_INDEX_TYPE uIndex, CZipMemFile &mf, bool bRewind=true, CZipCompressor::COffsetsPair *pSeekPair=NULL, DWORD nBufSize=65536) |
| bool | ExtractFile (ZIP_INDEX_TYPE uIndex, LPCTSTR lpszPath, bool bFullPath=true, LPCTSTR lpszNewName=NULL, CZipCompressor::COffsetsPair *pSeekPair=NULL, DWORD nBufSize=65536) |
| ZIP_INDEX_TYPE | FindFile (LPCTSTR lpszFileName, int iCaseSensitive=ffDefault, bool bFileNameOnly=false) |
| void | FindMatches (LPCTSTR lpszPattern, CZipIndexesArray &ar, bool bFullPath=true) |
| void | Flush () |
| void | FlushBuffers () |
| void | GetAdvanced (int *piWriteBuffer=NULL, int *piGeneralBuffer=NULL, int *piSearchBuffer=NULL) |
| CZipString | GetArchivePath () const |
| bool | GetAutoFlush () const |
| ZIP_SIZE_TYPE | GetBytesBeforeZip () const |
| CZipActionCallback * | GetCallback (CZipActionCallback::CallbackType iWhich) |
|
bool | GetCaseSensitivity () const |
| void | GetCentralDirInfo (CZipCentralDir::CInfo &info) const |
| ZIP_SIZE_TYPE | GetCentralDirSize (bool bWhole=true) const |
| WORD | GetCompressionMethod () const |
| ZIP_INDEX_TYPE | GetCount () const |
| ZIP_INDEX_TYPE | GetCount (bool bOnlyFiles) |
| const CZipCompressor * | GetCurrentCompressor () const |
| ZIP_VOLUME_TYPE | GetCurrentVolume () const |
| int | GetEncryptionMethod () const |
| bool | GetExhaustiveRead () const |
| CZipString | GetFileComment (ZIP_INDEX_TYPE uIndex) const |
| const CZipFileHeader * | GetFileInfo (ZIP_INDEX_TYPE uIndex) const |
| CZipFileHeader * | GetFileInfo (ZIP_INDEX_TYPE uIndex) |
| bool | GetFileInfo (CZipFileHeader &fhInfo, ZIP_INDEX_TYPE uIndex) const |
| ZIP_INDEX_TYPE | GetFindFastIndex (ZIP_INDEX_TYPE iFindFastIndex) const |
| bool | GetFromArchive (CZipArchive &zip, CZipStringArray &aNames, bool bKeepSystComp=false) |
| bool | GetFromArchive (CZipArchive &zip, CZipIndexesArray &aIndexes, bool bKeepSystComp=false) |
| bool | GetFromArchive (CZipArchive &zip, ZIP_INDEX_TYPE uIndex, LPCTSTR lpszNewFileName=NULL, ZIP_INDEX_TYPE uReplaceIndex=ZIP_FILE_INDEX_UNSPECIFIED, bool bKeepSystComp=false) |
| CZipString | GetGlobalComment () const |
| int | GetIgnoredConsistencyChecks () const |
| void | GetIndexes (const CZipStringArray &aNames, CZipIndexesArray &aIndexes) |
| ZIP_SIZE_TYPE | GetOccupiedSpace () const |
| CZipString | GetPassword () const |
| CZipString | GetRootPath () const |
| int | GetSegmMode () const |
| CZipStorage * | GetStorage () |
| CZipStringStoreSettings & | GetStringStoreSettings () |
| int | GetSystemCompatibility () const |
| CZipString | GetTempPath () const |
| bool | IsClosed (bool bArchive=true) const |
| bool | IsReadOnly () |
| bool | Open (CZipAbstractFile &af, int iMode=zipOpen) |
| bool | Open (LPCTSTR szPathName, int iMode=zipOpen, ZIP_SIZE_TYPE uVolumeSize=0) |
| bool | OpenFile (ZIP_INDEX_TYPE uIndex) |
| bool | OpenFrom (CZipArchive &zip) |
| bool | OpenNewFile (CZipFileHeader &header, int iLevel=CZipCompressor::levelDefault, LPCTSTR lpszFilePath=NULL) |
| const CZipFileHeader * | operator[] (ZIP_INDEX_TYPE uIndex) const |
| CZipFileHeader * | operator[] (ZIP_INDEX_TYPE uIndex) |
| bool | OverwriteLocalHeader (ZIP_INDEX_TYPE uIndex) |
| CZipString | PredictExtractedFileName (LPCTSTR lpszFileNameInZip, LPCTSTR lpszPath, bool bFullPath, LPCTSTR lpszNewName=NULL) const |
| CZipString | PredictFileNameInZip (LPCTSTR lpszFilePath, bool bFullPath, int iWhat=prAuto) const |
| ZIP_SIZE_TYPE | PredictMaximumFileSizeInArchive (LPCTSTR lpszFilePath, bool bFullPath) const |
| ZIP_SIZE_TYPE | PredictMaximumFileSizeInArchive (CZipFileHeader &fh) const |
| bool | PrependData (CZipAbstractFile &file, LPCTSTR lpszNewExt=NULL) |
| bool | PrependData (LPCTSTR lpszFilePath, LPCTSTR lpszNewExt=) |
| DWORD | ReadFile (void *pBuf, DWORD uSize) |
| bool | ReadLocalHeader (ZIP_INDEX_TYPE uIndex) |
| bool | RemoveCentralDirectoryFromArchive () |
| bool | RemoveFile (ZIP_INDEX_TYPE uIndex) |
| bool | RemoveFiles (const CZipStringArray &aNames) |
| bool | RemoveFiles (CZipIndexesArray &aIndexes) |
| bool | RenameFile (ZIP_INDEX_TYPE uIndex, LPCTSTR lpszNewName) |
| void | ResetStringStoreSettings () |
| bool | SeekInFile (CZipCompressor::COffsetsPair *pPair) |
| void | SetAdvanced (int iWriteBuffer=65536, int iGeneralBuffer=65536, int iSearchBuffer=32768) |
| void | SetAutoFlush (bool bAutoFlush=true) |
| const void | SetBytesBeforeZip (ZIP_SIZE_TYPE uCount=0) |
| void | SetCallback (CZipActionCallback *pCallback=NULL, int iWhich=CZipActionCallback::cbAll) |
| void | SetCaseSensitivity (bool bCaseSensitive) |
| bool | SetCompressionMethod (WORD uCompressionMethod=CZipCompressor::methodDeflate) |
| void | SetCompressionOptions (CZipCompressor::COptions *pOptions) |
| bool | SetEncryptionMethod (int iEncryptionMethod=CZipCryptograph::encStandard) |
| void | SetExhaustiveRead (bool bExhaustiveRead) |
| bool | SetFileComment (ZIP_INDEX_TYPE uIndex, LPCTSTR lpszComment) |
| void | SetFileHeaderAttr (CZipFileHeader &header, DWORD uAttr) const |
| bool | SetGlobalComment (LPCTSTR lpszComment) |
| void | SetIgnoredConsistencyChecks (int iLevel=checkIgnoredByDefault) |
| bool | SetPassword (LPCTSTR lpszPassword=NULL) |
| void | SetRootPath (LPCTSTR szPath=NULL) |
| void | SetSegmCallback (CZipSegmCallback *pCallback=NULL, int callbackType=scSpan) |
| void | SetStringStoreSettings (UINT uFileNameCodePage, bool bStoreNameInExtraData=false) |
| void | SetStringStoreSettings (UINT uFileNameCodePage, bool bStoreNameInExtraData, UINT uCommentCodePage) |
| void | SetStringStoreSettings (const CZipStringStoreSettings &settings) |
| bool | SetSystemCompatibility (int iSystemComp) |
| void | SetTempPath (LPCTSTR lpszPath=NULL, bool bForce=true) |
| bool | ShiftData (ZIP_SIZE_TYPE uOffset) |
| bool | TestFile (ZIP_INDEX_TYPE uIndex, DWORD uBufSize=65536) |
| CZipString | TrimRootPath (CZipPathComponent &zpc) const |
| ZIP_INDEX_TYPE | WillBeDuplicated (LPCTSTR lpszFilePath, bool bFullPath, bool bFileNameOnly=false, int iWhat=prAuto) |
| bool | WillEncryptNextFile () const |
| bool | WriteNewFile (const void *pBuf, DWORD uSize) |
Static Public Member Functions |
| static bool | RemovePathBeginning (LPCTSTR lpszBeginning, CZipString &szPath, ZIPSTRINGCOMPARE pCompareFunction) |
Public Attributes |
| bool | m_bRemoveDriveLetter |
Static Public Attributes |
|
static const char | m_gszCopyright [] |
|
static const char | m_gszVersion [] |
Protected Types |
| enum | OpenFileType { extract = -1,
nothing,
compress
} |
Protected Member Functions |
| void | ClearCompressor () |
| void | ClearCryptograph () |
| virtual void | CreateCompressor (WORD uMethod) |
| virtual void | CreateCryptograph (int iEncryptionMethod) |
| CZipFileHeader * | CurrentFile () |
| bool | EncryptFilesInternal (CZipIndexesArray *pIndexes) |
| void | InitOnOpen (int iArchiveSystCompatib, CZipCentralDir *pSource=NULL) |
| void | OpenInternal (int iMode) |
| bool | OpenNewFile (CZipFileHeader &header, int iLevel, LPCTSTR lpszFilePath, ZIP_INDEX_TYPE uReplaceIndex) |
| void | ReadLocalHeaderInternal (ZIP_INDEX_TYPE uIndex) |
| void | WriteCentralDirectory (bool bFlush=true) |
Protected Attributes |
| bool | m_bAutoFlush |
| bool | m_bCaseSensitive |
| bool | m_bExhaustiveRead |
| ZipArchiveLib::CZipCallbackProvider | m_callbacks |
| CZipCentralDir | m_centralDir |
| int | m_iArchiveSystCompatib |
| DWORD | m_iBufferSize |
| int | m_iEncryptionMethod |
| int | m_iFileOpened |
| CZipAutoBuffer | m_pBuffer |
| CZipCompressor * | m_pCompressor |
| CZipCryptograph * | m_pCryptograph |
| CZipAutoBuffer | m_pszPassword |
| ZIPSTRINGCOMPARE | m_pZipCompare |
| CZipStorage | m_storage |
| CZipStringStoreSettings | m_stringSettings |
| CZipString | m_szRootPath |
| CZipString | m_szTempPath |
| WORD | m_uCompressionMethod |
Represents a zip archive file.