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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? unzipfile.cpp

?? 學生信息管理系統x
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
								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);

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合网站在线观看| 欧美日韩精品系列| 久久伊人蜜桃av一区二区| 日本91福利区| 精品国产凹凸成av人网站| 韩国av一区二区三区四区| 国产午夜精品一区二区三区嫩草 | 久久这里只有精品视频网| 紧缚奴在线一区二区三区| 国产午夜亚洲精品理论片色戒 | 亚洲精品欧美二区三区中文字幕| 在线观看免费亚洲| 六月丁香婷婷色狠狠久久| 久久久久久久久蜜桃| 97久久精品人人做人人爽50路| 亚洲综合一二区| 欧美电视剧在线观看完整版| 成人性生交大合| 亚洲国产婷婷综合在线精品| 日韩色在线观看| 成人在线综合网站| 亚洲国产欧美日韩另类综合| 精品美女在线播放| 91麻豆精品一区二区三区| 蜜臀久久99精品久久久久宅男| 国产丝袜欧美中文另类| 欧美亚洲国产bt| 国产一区二区日韩精品| 亚洲欧美日韩一区二区三区在线观看| 欧美人妇做爰xxxⅹ性高电影| 国内不卡的二区三区中文字幕| 亚洲精品日韩一| 国产亚洲精品aa午夜观看| 欧美在线观看一区| 国产成人av一区| 亚洲成人动漫在线观看| 欧美一区二区三区成人| 91一区二区三区在线播放| 日韩—二三区免费观看av| 国产91在线|亚洲| 亚洲少妇30p| 欧美日韩精品一区二区三区四区| 樱桃视频在线观看一区| 波多野结衣91| 国产精品日韩精品欧美在线| 亚洲精品成人在线| 国产成人免费在线观看不卡| 日韩你懂的在线播放| www.性欧美| 亚洲日本免费电影| 国产精品18久久久| 精品国产sm最大网站| 亚洲自拍偷拍综合| 日韩你懂的在线观看| 国精品**一区二区三区在线蜜桃| 欧美老人xxxx18| 亚洲欧美日韩精品久久久久| 欧美在线视频日韩| 美国十次了思思久久精品导航| 日韩三级视频在线观看| 一区二区三区欧美激情| 91亚洲资源网| 国产欧美日韩不卡免费| 久久国产夜色精品鲁鲁99| 91女神在线视频| 国产精品视频九色porn| 成人av中文字幕| 丝袜诱惑制服诱惑色一区在线观看| 日韩影视精彩在线| 国产精品网曝门| 欧美日韩国产综合久久| 国产在线精品免费av| 亚洲色图欧美在线| 国产精品久久久久一区| 日韩女优视频免费观看| 日本va欧美va欧美va精品| 一区二区免费看| 麻豆精品久久精品色综合| 亚洲精品在线网站| 中文天堂在线一区| 亚洲黄色尤物视频| 亚洲欧美自拍偷拍色图| 国产激情偷乱视频一区二区三区| 日本亚洲视频在线| 亚洲激情av在线| 午夜久久久久久久久久一区二区| 一区二区三区加勒比av| 亚洲一区二区免费视频| 成人av在线电影| 99精品视频免费在线观看| 丁香啪啪综合成人亚洲小说 | 欧美不卡一区二区三区| 国产一区二区三区电影在线观看 | 午夜精品一区二区三区电影天堂| 日本怡春院一区二区| 亚洲同性gay激情无套| 欧美日韩综合一区| 成人av动漫在线| 九一九一国产精品| 日韩精品视频网| 丝袜亚洲精品中文字幕一区| 一个色在线综合| 国产精品女同一区二区三区| 久久综合九色欧美综合狠狠| 一二三区精品视频| 三级一区在线视频先锋| 中文字幕一区日韩精品欧美| 亚洲第一成人在线| 亚洲精品成人精品456| 亚洲免费观看高清| 亚洲精品视频在线看| 欧美日韩视频在线观看一区二区三区| 成人黄色在线网站| 色狠狠桃花综合| 久久蜜臀精品av| 日韩精品一二区| 国产成人午夜精品5599| 91精品婷婷国产综合久久竹菊| 亚洲欧洲韩国日本视频| 成a人片亚洲日本久久| 久久―日本道色综合久久| 天堂久久一区二区三区| 99精品欧美一区| 亚洲三级视频在线观看| 99国产精品视频免费观看| 久久久精品人体av艺术| 国产一区在线观看麻豆| 久久免费电影网| 国产99久久久国产精品免费看| 欧美日韩精品电影| 亚洲一区在线观看视频| 91在线国内视频| 午夜影院在线观看欧美| 日韩欧美在线1卡| 粉嫩一区二区三区性色av| 国产欧美一区二区精品忘忧草| 国产精品资源在线| 国产精品乱码一区二区三区软件| 成人免费av资源| 亚洲午夜久久久久久久久电影网| 国产一区二区三区免费| 久久天天做天天爱综合色| 久久丁香综合五月国产三级网站| 亚洲精品一线二线三线无人区| 成人一区二区在线观看| 日韩伦理免费电影| 欧美mv日韩mv国产网站app| 91一区一区三区| 美女视频黄a大片欧美| 亚洲另类一区二区| 久久免费精品国产久精品久久久久| 国产乱码精品一区二区三区忘忧草 | 亚洲综合偷拍欧美一区色| 欧美精品国产精品| 91免费国产在线| 成人午夜视频在线| 欧美一区二区三区婷婷月色 | 色老头久久综合| 韩国成人福利片在线播放| 蜜臀va亚洲va欧美va天堂 | 国产精品久久久久久亚洲毛片 | 国产精品久久久久久久久免费丝袜| 欧美日韩中文字幕精品| 91麻豆免费看| 色婷婷av一区二区三区gif| 成人激情动漫在线观看| 国产一区不卡精品| 久久精品99久久久| 国产成人自拍网| 日韩激情视频网站| 欧美日韩中文精品| 久久国产婷婷国产香蕉| 亚洲国产另类av| 日本不卡在线视频| 日韩精品福利网| 免费精品视频在线| 国产精品中文字幕日韩精品| 国产伦精品一区二区三区免费迷 | 国产成人av网站| 日韩精品91亚洲二区在线观看| 亚洲欧美另类小说| 五月激情综合色| 久久99国产精品免费| 国产在线视视频有精品| 日韩国产欧美在线播放| 午夜精品久久久久久久久久久| 麻豆精品视频在线观看免费| 国产精品资源在线| 91香蕉视频mp4| 欧美日韩一区中文字幕| 日韩欧美一区二区久久婷婷| 久久久久久久网| 日韩精品视频网站| 日韩三级在线免费观看| 欧美日韩国产免费| 日韩亚洲欧美高清| 国产精品国产a| 麻豆精品久久久| 在线免费观看日韩欧美| 国产日韩精品一区二区三区在线|