如何利用XUnzip进行解压?
在网上下载了XZip和XUnzip两个类。可以使用XZip进行压缩文件了。但是不知道如何通过XUnzip进行解压缩?
感觉解压应该是分一下几步走:
HZIP hz = OpenZip("E:\\zipTest\\myzip.zip",0,ZIP_FILENAME);
GetZipItem();
FindZipItem();
UnzipItem(hz,index,"E:\\zipTest\\myzip",0,ZIP_FILENAME);
但是其中 GetZipItem(); 这两个参数怎么填呢?
FindZipItem();
函数的定义是这样的:
GetZipItem() - 得到打开的zip档案文件中的相关条目的信息 /////////////////////////////////////////////////////////////////
//
// GetZipItem()
//
// Purpose: Get information about an item in an open zip archive
//
// Parameters: hz - handle of open zip archive
// index - index number (0 based) of item in zip
// ze - pointer to a ZIPENTRY (if ANSI) or ZIPENTRYW
// struct (if Unicode)
//
// Returns: ZRESULT - ZR_OK if success, otherwise some other value
//
FindZipItem() - 通过名称查找条目并返回相关信息/////////////////////////////////////////////////////////////////
//
// FindZipItem()
//
// Purpose: Find item by name and return information about it
//
// Parameters: hz - handle of open zip archive
// name - name of file to look for inside zip archive
// ic - TRUE = case insensitive
// index - pointer to index number returned, or -1
// ze - pointer to a ZIPENTRY (if ANSI) or ZIPENTRYW
// struct (if Unicode)
//
// Returns: ZRESULT - ZR_OK if success, otherwise some other value
请各位赐教咯,谢啦~~~