General Format of a .ZIP file
Files stored in arbitrary order. Large .ZIP files can span multiple
diskette media or be split into user-defined segment sizes. The
minimum user-defined segment size for a split .ZIP file is 64K.
Overall .ZIP file format:
[local file header 1]
[file data 1]
[data descriptor 1]
.
.
.
[local file header n]
[file data n]
[data descriptor n]
[central directory]
typedef struct tagZIPHEADER
{
char* szFilename;
unsigned short uFileNameSize;
unsigned short uVersionMadeBy; ///< version made by and system compatibility
unsigned short uVersionNeeded; ///< version needed to extract
unsigned short uFlag; ///< general purpose bit flag
unsigned short uMethod; ///< compression method
unsigned short uModTime; ///< last mod file time
unsigned short uModDate; ///< last mod file date
unsigned long uCrc32; ///< crc-32
unsigned long uComprSize; ///< compressed size
unsigned long uUncomprSize; ///< uncompressed size
unsigned int uExtraFieldSize;
//central directory
unsigned int uCommentSize;
unsigned int uDiskStart;
unsigned int uInternalAttr;
unsigned long uExternalAttr;
unsigned long uOffset;
}ZIPHEADER, FAR* LPZIPHEADER;
typedef struct tagENDINFO{
unsigned long m_uCentrDirPos; ///< the position of the beginning of the central directory (as located by #Locate)
unsigned long m_uBytesBeforeZip;///< The number of bytes before the actual zip archive in a file. It is non-zero for self-extracting archives.
unsigned short m_uThisDisk; ///< number of the disk with the central directory end record (the number of disks in the disk-spanning archive)
unsigned short m_uDiskWithCD; ///< number of the disk with the start of the central directory
unsigned short m_uDiskEntriesNo; ///< total number of entries in the central dir on this disk
unsigned short m_uEntriesNumber; ///< total number of entries in the central dir
unsigned long m_uSize; ///< size of the central directory (valid only if #m_bOnDisk is \c true; use #GetSize instead)
unsigned long m_uOffset; ///< offset of start of central directory with respect to the starting disk number
///< (as written in the central directory record);
///< valid only if #m_bOnDisk is \c true
}ENDINFO, FAR* LPENDINFO;
posted on 2004-05-26 18:28 LeighSword 阅读(426) 评论(0) 收藏 举报
浙公网安备 33010602011771号