// // General-purpose Zip archive access. This class allows both reading and // writing to Zip archives, including deletion of existing entries. // #ifndef __LIBS_ZIPFILE_H #define __LIBS_ZIPFILE_H
kMaxCommentLen = 65535, // longest possible in ushort
kMaxEOCDSearch = kMaxCommentLen + EndOfCentralDir::kEOCDLen,
};
void dump(void) const;
};
/* read all entries in the central dir */
status_t readCentralDir(void);
/* crunch deleted entries out */
status_t crunchArchive(void);
/* clean up mEntries */ void discardEntries(void);
/* common handler for all "add" functions */
status_t addCommon(constchar* fileName, constvoid* data, size_t size, constchar* storageName, int compressionMethod, ZipEntry** ppEntry);
/* copy all of "srcFp" into "dstFp" */
status_t copyFpToFp(FILE* dstFp, FILE* srcFp, uint32_t* pCRC32); /* copy all of "data" into "dstFp" */
status_t copyDataToFp(FILE* dstFp, constvoid* data, size_t size, uint32_t* pCRC32); /* copy some of "srcFp" into "dstFp" */
status_t copyPartialFpToFp(FILE* dstFp, FILE* srcFp, size_t length,
uint32_t* pCRC32); /* like memmove(), but on parts of a single file */
status_t filemove(FILE* fp, off_t dest, off_t src, size_t n); /* compress all of "srcFp" into "dstFp", using Deflate */
status_t compressFpToFp(FILE* dstFp, FILE* srcFp, constvoid* data, size_t size, uint32_t* pCRC32);
/* get modification date from a file descriptor */
time_t getModTime(int fd);
/* *WeusestdioFILE*,whichgivesusbufferingbutmakesdealing *withfiles>2GBawkward.UntilwesupportZip64,we'refine.
*/
FILE* mZipFp; // Zip file pointer
/* one of these per file */
EndOfCentralDir mEOCD;
/* did we open this read-only? */ bool mReadOnly;
/* set this when we trash the central dir */ bool mNeedCDRewrite;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.