亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? unzipfile.cpp

?? 本程序所用壓縮函數(shù)庫(kù)在子目錄zipfunc中,在zipfunc目錄下,有兩個(gè)子目錄分別包含Release版和Debug版的zipfunc.lib,兩者都是共享鏈接庫(kù)編譯生成.同樣,主程序的鏈接也必須用
?? CPP
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
								uDoCopy);

			uf.pfile_in_zip_read->rest_read_uncompressed-=uDoCopy;
			uf.pfile_in_zip_read->stream.avail_in -= uDoCopy;
			uf.pfile_in_zip_read->stream.avail_out -= uDoCopy;
			uf.pfile_in_zip_read->stream.next_out += uDoCopy;
			uf.pfile_in_zip_read->stream.next_in += uDoCopy;
            uf.pfile_in_zip_read->stream.total_out += uDoCopy;
			iRead += uDoCopy;
		}
		else
		{
			uLong uTotalOutBefore = uf.pfile_in_zip_read->stream.total_out;
			const Bytef *bufBefore = uf.pfile_in_zip_read->stream.next_out;
			int flush=Z_SYNC_FLUSH;

			/*
			if ((uf.pfile_in_zip_read->rest_read_uncompressed ==
			         uf.pfile_in_zip_read->stream.avail_out) &&
				(uf.pfile_in_zip_read->rest_read_compressed == 0))
				flush = Z_FINISH;
			*/
			int err = inflate(&uf.pfile_in_zip_read->stream,flush);

			uLong uTotalOutAfter = uf.pfile_in_zip_read->stream.total_out;
			uLong uOutThis = uTotalOutAfter-uTotalOutBefore;
			
			uf.pfile_in_zip_read->crc32 = 
                crc32(uf.pfile_in_zip_read->crc32,bufBefore,
                        (uInt)(uOutThis));

			uf.pfile_in_zip_read->rest_read_uncompressed -=
                uOutThis;

			iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
            
			if (err==Z_STREAM_END)
				return iRead;

			CheckForError(err);
		}
	}

	return iRead;
}

/*
  Read extra field from the current file (opened by OpenCurrentFile)
  This is the local-header version of the extra field (sometimes, there is
    more info in the local-header version than in the central-header)

  if buf==NULL, it return the size of the local extra field that can be read

  if buf!=NULL, len is the size of the buffer, the extra header is copied in
	buf.
  the return value is the number of bytes copied in buf
*/
int CUnzipFile::GetLocalExtrafield (void* buf, UINT len)
{
	if (!uf.pfile_in_zip_read)
		ThrowError(UNZ_PARAMERROR);


	uLong size_to_read = (uf.pfile_in_zip_read->size_local_extrafield - 
				uf.pfile_in_zip_read->pos_local_extrafield);

	if (!buf)
		return (int)size_to_read;
	
	uInt read_now;

	if (len>size_to_read)
		read_now = (uInt)size_to_read;
	else
		read_now = (uInt)len ;

	if (!read_now)
		return 0;

	
	uf.file.Seek(uf.pfile_in_zip_read->offset_local_extrafield + 
			  uf.pfile_in_zip_read->pos_local_extrafield, CFile::begin);


	return (int)uf.file.Read(buf, read_now);
}
/*
  Get the global comment string of the ZipFile, in the szComment buffer.
  uSizeBuf is the size of the szComment buffer.
  return the number of byte copied
*/
int CUnzipFile::GetGlobalComment (char* szComment, uLong uSizeBuf)
{

	uLong uReadThis = uSizeBuf;
	if (uReadThis > uf.gi.size_comment)
		uReadThis = uf.gi.size_comment;

	uf.file.Seek(uf.central_pos+22, CFile::begin);

	if (uReadThis)
    {
      *szComment = '\0';
	  uReadThis = uf.file.Read(szComment, (uInt)uReadThis);
    }

	if (szComment && (uSizeBuf > uf.gi.size_comment))
		*(szComment+uf.gi.size_comment)='\0';

	return (int)uReadThis;
}

/*
  Give the current position in uncompressed data
*/
z_off_t CUnzipFile::tell()
{
	if (!uf.pfile_in_zip_read)
		ThrowError(UNZ_PARAMERROR);

	return (z_off_t)uf.pfile_in_zip_read->stream.total_out;
}


/*
  return true if the end of file was reached, false elsewhere 
*/
bool CUnzipFile::eof()
{

	if (!uf.pfile_in_zip_read)
		ThrowError(UNZ_PARAMERROR);
	
	return uf.pfile_in_zip_read->rest_read_uncompressed == 0;
}

CUnzipFile::~CUnzipFile()
{
// 	Close(); // cannot be here: if an exception is thrown strange things can happen

}

void CUnzipFile::unzlocal_getByte(int & pi)
{

    unsigned char c;
	uf.file.Read(&c, 1);
	pi = (int)c;
    
}

void CUnzipFile::unzlocal_getShort (uLong & pX)
{
    int i;

    unzlocal_getByte(i);
    uLong x = (uLong)i;
    unzlocal_getByte(i);
    x += ((uLong)i)<<8;
   
	pX = x;
}

void CUnzipFile::unzlocal_getLong (uLong & pX)
{
	

	uLong x;
	unzlocal_getShort(x);
	uLong y;
	unzlocal_getShort(y);
	x += y << 16;
    pX = x;
}

//    Compare two filename (fileName1,fileName2).
int CUnzipFile::StringFileNameCompare(CString fileName1, CString fileName2, bool caseSensitive)
{
	return caseSensitive ? fileName1.Collate(fileName2) : 	fileName1.CollateNoCase(fileName2);
}

/*
  Locate the Central directory of a zipfile (at the end, just before
    the global comment)
*/
uLong CUnzipFile::unzlocal_SearchCentralDir()
{
	
	uLong uMaxBack=0xffff; /* maximum size of global comment */

	uLong uSizeFile = uf.file.GetLength();

	if (uMaxBack > uSizeFile)
		uMaxBack = uSizeFile;

	char* buf = new char[BUFREADCOMMENT + 4];

	uLong uBackRead = 4;
	uLong uPosFound = 0;

	try
	{
		while ((uBackRead < uMaxBack) && !uPosFound)
		{
			uLong uReadSize,uReadPos ;

			if (uBackRead + BUFREADCOMMENT > uMaxBack) 
				uBackRead = uMaxBack;
			else
				uBackRead += BUFREADCOMMENT;

			uReadPos = uSizeFile - uBackRead ;
			
			uReadSize = ((BUFREADCOMMENT + 4) < (uSizeFile - uReadPos)) ? 
						 (BUFREADCOMMENT + 4) : (uSizeFile - uReadPos);

			uf.file.Seek(uReadPos, CFile::begin);
			uf.file.Read(buf, uReadSize);

			for (int i= (int)uReadSize - 3; (i--) > 0 ;)
				if (((*(buf+i)) == 0x50) && ((*(buf+i+1))==0x4b) && 
					((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
				{
					uPosFound = uReadPos + i;
					break;
				}

		}
	}
	catch (CException*)
	{
		delete[] buf;
		throw;
	}
	delete[] buf;

	if (!uPosFound)
		ThrowError(UNZ_BADZIPFILE);

	return uPosFound;
	
}

/*
   Translate date/time from Dos format to tm_unz (readable more easilty)
*/
void CUnzipFile::unzlocal_DosDateToTmuDate(unz_file_info &file_info)
{
	CTime t(HIWORD(file_info.dosDate), LOWORD(file_info.dosDate));
	file_info.tmu_date = t;
}


/*
  Get Info about the current file in the zipfile, with internal only info
*/
void CUnzipFile::unzlocal_GetCurrentFileInfoInternal( unz_file_info & file_info,
                                         unz_file_info_internal & file_info_internal,
                                         LPSTR szFileName,
										 uLong fileNameBufferSize,
										 void *extraField,
										 uLong extraFieldBufferSize,
										 LPSTR szComment,
										 uLong commentBufferSize)
{

	
	uf.file.Seek(uf.pos_in_central_dir + uf.byte_before_the_zipfile, CFile::begin);
	
	uLong uMagic;

	/* we check the magic */
	unzlocal_getLong(uMagic);
	if (uMagic != 0x02014b50)
		ThrowError(UNZ_BADZIPFILE);

	unzlocal_getShort(file_info.version);
	unzlocal_getShort(file_info.version_needed);
	unzlocal_getShort(file_info.flag);
	unzlocal_getShort(file_info.compression_method);
	unzlocal_getLong(file_info.dosDate);

    unzlocal_DosDateToTmuDate(file_info);

	unzlocal_getLong(file_info.crc);
	unzlocal_getLong(file_info.compressed_size);
	unzlocal_getLong(file_info.uncompressed_size);
	unzlocal_getShort(file_info.size_filename);
	unzlocal_getShort(file_info.size_file_extra);
	unzlocal_getShort(file_info.size_file_comment);
	unzlocal_getShort(file_info.disk_num_start);
	unzlocal_getShort(file_info.internal_fa);
	unzlocal_getLong(file_info.external_fa);
	unzlocal_getLong(file_info_internal.offset_curfile);

	uLong lSeek = file_info.size_filename;

	if (szFileName)
	{
		uLong uSizeRead ;
		if (file_info.size_filename < fileNameBufferSize)
		{
			*(szFileName + file_info.size_filename) = '\0';
			uSizeRead = file_info.size_filename;
		}
		else
			uSizeRead = fileNameBufferSize;

		if ((file_info.size_filename>0) && (fileNameBufferSize>0))
			uf.file.Read(szFileName, uSizeRead);

		lSeek -= uSizeRead;
	}

	
	if (extraField)
	{
		uLong uSizeRead ;
		if (file_info.size_file_extra < extraFieldBufferSize)
			uSizeRead = file_info.size_file_extra;
		else
			uSizeRead = extraFieldBufferSize;

		if (lSeek != 0)
		{
			uf.file.Seek(lSeek, CFile::begin);
			lSeek=0;
		}
		
		if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
			uf.file.Read(extraField, uSizeRead);

		lSeek += file_info.size_file_extra - uSizeRead;
	}
	else
		lSeek+=file_info.size_file_extra; 

	
	if (szComment)
	{
		uLong uSizeRead ;

		if (file_info.size_file_comment<commentBufferSize)
		{
			*(szComment+file_info.size_file_comment)='\0';
			uSizeRead = file_info.size_file_comment;
		}
		else
			uSizeRead = commentBufferSize;

		if (lSeek != 0)
		{
			uf.file.Seek(lSeek, CFile::begin);
			lSeek=0;
		}

		if ((file_info.size_file_comment>0) && (commentBufferSize>0))
			uf.file.Read(szComment, uSizeRead);
			
		lSeek+=file_info.size_file_comment - uSizeRead;
	}
	else
		lSeek+=file_info.size_file_comment;

}


void CUnzipFile::Open(LPCTSTR lpszPath)
{
	if (!IsClosed())
		return;

	CFileException* e = new CFileException;
	if (!uf.file.Open(lpszPath, CFile::modeRead | CFile::shareDenyWrite, e))
		throw e;
	e->Delete();

	uLong central_pos = unzlocal_SearchCentralDir();

	uf.file.Seek(central_pos, CFile::begin);

	/* the signature, already checked */
	uLong uL;
	unzlocal_getLong(uL);

	uLong number_disk;          /* number of the current dist, used for 
								   spaning ZIP, unsupported, always 0*/
	unzlocal_getShort(number_disk);

	uLong number_disk_with_CD;  /* number the the disk with central dir, used
								   for spaning ZIP, unsupported, always 0*/
	unzlocal_getShort(number_disk_with_CD);

	/* number of the disk with the start of the central directory */
	unzlocal_getShort(uf.gi.number_entry);


	uLong number_entry_CD;      /* total number of entries in
	                               the central dir 
	                               (same than number_entry on nospan) */
	unzlocal_getShort(number_entry_CD);

	
	if ( (number_entry_CD != uf.gi.number_entry) ||
		(number_disk_with_CD != 0) ||
		(number_disk != 0))
			ThrowError(UNZ_BADZIPFILE);

	/* size of the central directory */
	unzlocal_getLong(uf.size_central_dir);

	/* offset of start of central directory with respect to the 
	      starting disk number */
	unzlocal_getLong(uf.offset_central_dir);

	/* zipfile comment length */
	unzlocal_getShort(uf.gi.size_comment);

	if ( central_pos < uf.offset_central_dir + uf.size_central_dir)
		ThrowError(UNZ_BADZIPFILE);


	uf.byte_before_the_zipfile = central_pos -
		(uf.offset_central_dir + uf.size_central_dir);

	uf.central_pos = central_pos;
	
	GoToFirstFile();	

}

void CUnzipFile::UpdateFileStatus(CFile &f, unz_file_info &ui)
{
	CString s = f.GetFilePath();
	f.Close();
	CFileStatus fs;
	fs.m_ctime = fs.m_atime = CTime::GetCurrentTime();
	fs.m_attribute = 0;
	fs.m_mtime = ui.tmu_date;
	CFile::SetStatus(s, fs);
	SetFileAttributes(s, ui.external_fa);

}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区在线看片| 裸体健美xxxx欧美裸体表演| 这里只有精品免费| 福利一区福利二区| 一区二区三区不卡视频| 欧美成人伊人久久综合网| bt7086福利一区国产| 捆绑调教美女网站视频一区| 亚洲精品ww久久久久久p站| 久久一二三国产| 欧美精品久久久久久久久老牛影院| 国产一区二区导航在线播放| 亚洲国产成人av网| 国产精品福利影院| 精品日韩一区二区三区 | eeuss鲁片一区二区三区| 日精品一区二区| 国产精品久久久久久久久久久免费看| 欧美一区二区三级| 欧洲另类一二三四区| a在线欧美一区| 国产激情偷乱视频一区二区三区 | 日韩高清欧美激情| 亚洲色图清纯唯美| 国产欧美日韩综合精品一区二区 | 中文字幕乱码久久午夜不卡| 91精品国产手机| 色婷婷综合久久久| 成人午夜av影视| 激情综合色丁香一区二区| 亚洲成人动漫在线免费观看| 亚洲码国产岛国毛片在线| 国产人成一区二区三区影院| 精品人在线二区三区| 91精品国产综合久久小美女| 色哟哟一区二区| 成人av电影在线网| 国产91精品精华液一区二区三区| 加勒比av一区二区| 久久精品72免费观看| 麻豆91精品视频| 另类欧美日韩国产在线| 日本不卡一区二区三区| 日本欧美一区二区三区乱码 | 成人av网在线| 波多野结衣亚洲| 成人深夜福利app| 高清不卡在线观看av| 成人精品国产福利| 9l国产精品久久久久麻豆| 91亚洲精品久久久蜜桃| 99re8在线精品视频免费播放| www.视频一区| 在线视频一区二区三| 在线看国产一区| 欧美在线免费播放| 欧美日韩国产精选| 51精品视频一区二区三区| 欧美精品在线视频| 欧美mv日韩mv国产网站| 久久久一区二区三区捆绑**| 国产精品久久久爽爽爽麻豆色哟哟| 国产精品久久一卡二卡| 亚洲卡通动漫在线| 无码av免费一区二区三区试看| 青娱乐精品在线视频| 狠狠色综合日日| 福利一区二区在线| 色综合久久88色综合天天6| 欧美日本国产视频| 2021国产精品久久精品| 中文字幕高清一区| 一区二区三区四区五区视频在线观看| 亚洲亚洲人成综合网络| 美脚の诱脚舐め脚责91| 国产一区二区成人久久免费影院| 99久久国产综合色|国产精品| 在线免费观看不卡av| 日韩欧美在线不卡| 国产精品美女视频| 亚洲成人av一区二区三区| 久久99国产精品麻豆| 不卡av电影在线播放| 欧美日韩三级在线| 国产偷国产偷精品高清尤物| 亚洲精品午夜久久久| 喷白浆一区二区| av电影天堂一区二区在线观看| 在线精品观看国产| 久久久久亚洲蜜桃| 亚洲午夜激情av| 国产伦精品一区二区三区免费| 99久久免费精品| 欧美一区二区三区影视| 国产精品久久久久久久久快鸭| 日日夜夜精品视频天天综合网| 成人黄色片在线观看| 欧美日韩免费在线视频| 中文字幕 久热精品 视频在线| 天堂精品中文字幕在线| 国产一区二区三区免费在线观看| 日本精品视频一区二区| 久久久久久久久久久久久久久99 | 欧美精品tushy高清| 中文字幕第一区二区| 蜜桃av一区二区| 欧美午夜精品久久久| 久久精品水蜜桃av综合天堂| 天天综合天天做天天综合| 91老司机福利 在线| 久久久天堂av| 日韩不卡在线观看日韩不卡视频| 91啪亚洲精品| 久久久精品国产免大香伊| 午夜在线电影亚洲一区| 91在线观看下载| 国产欧美精品国产国产专区| 蜜臀a∨国产成人精品| 欧美日韩免费一区二区三区视频| 综合电影一区二区三区| 国产成人免费在线视频| 2023国产精华国产精品| 日本不卡视频一二三区| 91福利视频网站| 亚洲精品免费一二三区| 粉嫩久久99精品久久久久久夜| 日韩欧美国产一二三区| 日精品一区二区三区| 欧美日韩午夜影院| 亚洲第一狼人社区| 欧美日韩一区二区在线观看视频| 亚洲狠狠丁香婷婷综合久久久| 99久久精品国产一区| 中文在线免费一区三区高中清不卡| 国产在线国偷精品产拍免费yy| 91精品国产乱码久久蜜臀| 亚洲一卡二卡三卡四卡无卡久久| 一本一本大道香蕉久在线精品| 亚洲欧美日韩国产综合| 97久久久精品综合88久久| 中文字幕在线观看一区二区| 不卡大黄网站免费看| 亚洲丝袜精品丝袜在线| 不卡一区中文字幕| 亚洲视频网在线直播| 一本久道中文字幕精品亚洲嫩| 国产精品毛片大码女人| 成人av在线影院| 亚洲欧洲精品天堂一级 | 国产伦精一区二区三区| 久久久久高清精品| 高清国产一区二区三区| 日韩理论片一区二区| 色素色在线综合| 亚洲福利视频一区二区| 欧美一区二区性放荡片| 麻豆精品国产传媒mv男同| 久久色成人在线| 成人激情动漫在线观看| 亚洲一区二区三区影院| 欧美人与性动xxxx| 极品销魂美女一区二区三区| 国产亚洲精品免费| 99国产一区二区三精品乱码| 亚洲综合色区另类av| 欧美精品久久一区二区三区| 精品一区二区在线视频| 久久精品夜夜夜夜久久| 91看片淫黄大片一级在线观看| 亚洲电影激情视频网站| 欧美成人女星排行榜| 成人一级视频在线观看| 亚洲黄色免费网站| 欧美大片国产精品| 成人激情小说网站| 午夜精品免费在线| 久久精品亚洲乱码伦伦中文| 色狠狠一区二区三区香蕉| 日韩精品一二区| 欧美激情在线看| 欧美区在线观看| 国产成人8x视频一区二区| 一区二区三区四区激情| 日韩欧美在线一区二区三区| av激情亚洲男人天堂| 亚洲成av人片一区二区| 久久中文字幕电影| 欧亚洲嫩模精品一区三区| 国内精品久久久久影院薰衣草| 亚洲图片激情小说| 精品日韩欧美在线| 欧美性猛交xxxxxx富婆| 国产精品91一区二区| 亚洲国产精品麻豆| 国产女人aaa级久久久级| 欧美二区在线观看| 成人av动漫网站| 久草在线在线精品观看| 亚洲女爱视频在线| 欧美国产精品专区|