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

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

?? unzip.cpp

?? 一個C語言實現的壓縮解壓的工具代碼
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
	s=(unz_s*)ALLOC(sizeof(unz_s));
	*s=us;
	unzGoToFirstFile((unzFile)s);	
	return (unzFile)s;	
}


/*
  Close a ZipFile opened with unzipOpen.
  If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),
    these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
  return UNZ_OK if there is no problem. */
extern int ZEXPORT unzClose (unzFile file)
	
{
	unz_s* s;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;

    if (s->pfile_in_zip_read!=NULL)
        unzCloseCurrentFile(file);

	fclose(s->file);
	TRYFREE(s);
	return UNZ_OK;
}


/*
  Write info about the ZipFile in the *pglobal_info structure.
  No preparation of the structure is needed
  return UNZ_OK if there is no problem. */
extern int ZEXPORT unzGetGlobalInfo (	unzFile file,
	unz_global_info *pglobal_info)

{
	unz_s* s;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
	*pglobal_info=s->gi;
	return UNZ_OK;
}


/*
   Translate date/time from Dos format to tm_unz (readable more easilty)
*/
local void unzlocal_DosDateToTmuDate ( uLong ulDosDate,
    tm_unz* ptm)
   
{
    uLong uDate;
    uDate = (uLong)(ulDosDate>>16);
    ptm->tm_mday = (uInt)(uDate&0x1f) ;
    ptm->tm_mon =  (uInt)((((uDate)&0x1E0)/0x20)-1) ;
    ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;

    ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
    ptm->tm_min =  (uInt) ((ulDosDate&0x7E0)/0x20) ;
    ptm->tm_sec =  (uInt) (2*(ulDosDate&0x1f)) ;
}

/*
  Get Info about the current file in the zipfile, with internal only info
*/
local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
                                                  unz_file_info *pfile_info,
                                                  unz_file_info_internal 
                                                  *pfile_info_internal,
                                                  char *szFileName,
												  uLong fileNameBufferSize,
                                                  void *extraField,
												  uLong extraFieldBufferSize,
                                                  char *szComment,
												  uLong commentBufferSize));

local int unzlocal_GetCurrentFileInfoInternal (unzFile file,
	unz_file_info *pfile_info,
	unz_file_info_internal *pfile_info_internal,
	char *szFileName,
	uLong fileNameBufferSize,
	void *extraField,
	uLong extraFieldBufferSize,
	char *szComment,
	uLong commentBufferSize)
	
{
	unz_s* s;
	unz_file_info file_info;
	unz_file_info_internal file_info_internal;
	int err=UNZ_OK;
	uLong uMagic;
	long lSeek=0;

	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
	if (fseek(s->file,s->pos_in_central_dir+s->byte_before_the_zipfile,SEEK_SET)!=0)
		err=UNZ_ERRNO;


	/* we check the magic */
	if (err==UNZ_OK)
		if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
			err=UNZ_ERRNO;
		else if (uMagic!=0x02014b50)
			err=UNZ_BADZIPFILE;

	if (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.version_needed) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.flag) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.compression_method) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&file_info.dosDate) != UNZ_OK)
		err=UNZ_ERRNO;

    unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);

	if (unzlocal_getLong(s->file,&file_info.crc) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&file_info.compressed_size) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&file_info.uncompressed_size) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.size_filename) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.size_file_extra) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.size_file_comment) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.disk_num_start) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&file_info.internal_fa) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&file_info.external_fa) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&file_info_internal.offset_curfile) != UNZ_OK)
		err=UNZ_ERRNO;

	lSeek+=file_info.size_filename;
	if ((err==UNZ_OK) && (szFileName!=NULL))
	{
		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))
			if (fread(szFileName,(uInt)uSizeRead,1,s->file)!=1)
				err=UNZ_ERRNO;
		lSeek -= uSizeRead;
	}

	
	if ((err==UNZ_OK) && (extraField!=NULL))
	{
		uLong uSizeRead ;
		if (file_info.size_file_extra<extraFieldBufferSize)
			uSizeRead = file_info.size_file_extra;
		else
			uSizeRead = extraFieldBufferSize;

		if (lSeek!=0)
			if (fseek(s->file,lSeek,SEEK_CUR)==0)
				lSeek=0;
			else
				err=UNZ_ERRNO;
		if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
			if (fread(extraField,(uInt)uSizeRead,1,s->file)!=1)
				err=UNZ_ERRNO;
		lSeek += file_info.size_file_extra - uSizeRead;
	}
	else
		lSeek+=file_info.size_file_extra; 

	
	if ((err==UNZ_OK) && (szComment!=NULL))
	{
		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)
			if (fseek(s->file,lSeek,SEEK_CUR)==0)
				lSeek=0;
			else
				err=UNZ_ERRNO;
		if ((file_info.size_file_comment>0) && (commentBufferSize>0))
			if (fread(szComment,(uInt)uSizeRead,1,s->file)!=1)
				err=UNZ_ERRNO;
		lSeek+=file_info.size_file_comment - uSizeRead;
	}
	else
		lSeek+=file_info.size_file_comment;

	if ((err==UNZ_OK) && (pfile_info!=NULL))
		*pfile_info=file_info;

	if ((err==UNZ_OK) && (pfile_info_internal!=NULL))
		*pfile_info_internal=file_info_internal;

	return err;
}



/*
  Write info about the ZipFile in the *pglobal_info structure.
  No preparation of the structure is needed
  return UNZ_OK if there is no problem.
*/
extern int ZEXPORT unzGetCurrentFileInfo (	unzFile file,
	unz_file_info *pfile_info,
	char *szFileName,
	uLong fileNameBufferSize,
	void *extraField,
	uLong extraFieldBufferSize,
	char *szComment,
	uLong commentBufferSize)

{
	return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,
												szFileName,fileNameBufferSize,
												extraField,extraFieldBufferSize,
												szComment,commentBufferSize);
}

/*
  Set the current file of the zipfile to the first file.
  return UNZ_OK if there is no problem
*/
extern int ZEXPORT unzGoToFirstFile (	unzFile file)

{
	int err=UNZ_OK;
	unz_s* s;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
	s->pos_in_central_dir=s->offset_central_dir;
	s->num_file=0;
	err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
											 &s->cur_file_info_internal,
											 NULL,0,NULL,0,NULL,0);
	s->current_file_ok = (err == UNZ_OK);
	return err;
}


/*
  Set the current file of the zipfile to the next file.
  return UNZ_OK if there is no problem
  return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
*/
extern int ZEXPORT unzGoToNextFile (	unzFile file)

{
	unz_s* s;	
	int err;

	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
	if (!s->current_file_ok)
		return UNZ_END_OF_LIST_OF_FILE;
	if (s->num_file+1==s->gi.number_entry)
		return UNZ_END_OF_LIST_OF_FILE;

	s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
			s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
	s->num_file++;
	err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
											   &s->cur_file_info_internal,
											   NULL,0,NULL,0,NULL,0);
	s->current_file_ok = (err == UNZ_OK);
	return err;
}


/*
  Try locate the file szFileName in the zipfile.
  For the iCaseSensitivity signification, see unzipStringFileNameCompare

  return value :
  UNZ_OK if the file is found. It becomes the current file.
  UNZ_END_OF_LIST_OF_FILE if the file is not found
*/
extern int ZEXPORT unzLocateFile (	unzFile file,
	const char *szFileName,
	int iCaseSensitivity)

{
	unz_s* s;	
	int err;

	
	uLong num_fileSaved;
	uLong pos_in_central_dirSaved;


	if (file==NULL)
		return UNZ_PARAMERROR;

    if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
        return UNZ_PARAMERROR;

	s=(unz_s*)file;
	if (!s->current_file_ok)
		return UNZ_END_OF_LIST_OF_FILE;

	num_fileSaved = s->num_file;
	pos_in_central_dirSaved = s->pos_in_central_dir;

	err = unzGoToFirstFile(file);

	while (err == UNZ_OK)
	{
		char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
		unzGetCurrentFileInfo(file,NULL,
								szCurrentFileName,sizeof(szCurrentFileName)-1,
								NULL,0,NULL,0);
		if (unzStringFileNameCompare(szCurrentFileName,
										szFileName,iCaseSensitivity)==0)
			return UNZ_OK;
		err = unzGoToNextFile(file);
	}

	s->num_file = num_fileSaved ;
	s->pos_in_central_dir = pos_in_central_dirSaved ;
	return err;
}


/*
  Read the local header of the current zipfile
  Check the coherency of the local header and info in the end of central
        directory about this file
  store in *piSizeVar the size of extra info in local header
        (filename and size of extra field data)
*/
local int unzlocal_CheckCurrentFileCoherencyHeader (	unz_s* s,
	uInt* piSizeVar,
	uLong *poffset_local_extrafield,
	uInt  *psize_local_extrafield)

{
	uLong uMagic,uData,uFlags;
	uLong size_filename;
	uLong size_extra_field;
	int err=UNZ_OK;

	*piSizeVar = 0;
	*poffset_local_extrafield = 0;
	*psize_local_extrafield = 0;

	if (fseek(s->file,s->cur_file_info_internal.offset_curfile +
								s->byte_before_the_zipfile,SEEK_SET)!=0)
		return UNZ_ERRNO;


	if (err==UNZ_OK)
		if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
			err=UNZ_ERRNO;
		else if (uMagic!=0x04034b50)
			err=UNZ_BADZIPFILE;

	if (unzlocal_getShort(s->file,&uData) != UNZ_OK)
		err=UNZ_ERRNO;
/*
	else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
		err=UNZ_BADZIPFILE;
*/
	if (unzlocal_getShort(s->file,&uFlags) != UNZ_OK)
		err=UNZ_ERRNO;

	if (unzlocal_getShort(s->file,&uData) != UNZ_OK)
		err=UNZ_ERRNO;
	else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
		err=UNZ_BADZIPFILE;

    if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
                         (s->cur_file_info.compression_method!=Z_DEFLATED))
        err=UNZ_BADZIPFILE;

	if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* date/time */
		err=UNZ_ERRNO;

	if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* crc */
		err=UNZ_ERRNO;
	else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&
		                      ((uFlags & 8)==0))
		err=UNZ_BADZIPFILE;

	if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* size compr */
		err=UNZ_ERRNO;
	else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) &&
							  ((uFlags & 8)==0))
		err=UNZ_BADZIPFILE;

	if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* size uncompr */
		err=UNZ_ERRNO;
	else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
老司机精品视频线观看86| 国产九九视频一区二区三区| 亚洲1区2区3区4区| 日本在线不卡一区| 国产成人在线免费观看| 91看片淫黄大片一级在线观看| 91天堂素人约啪| 国产亚洲1区2区3区| 日本欧美在线观看| 欧美三级在线视频| 国产精品二区一区二区aⅴ污介绍| 九九精品一区二区| 欧美一区二区三区思思人| 一区二区三区丝袜| 成人综合在线观看| 日韩欧美国产不卡| 亚洲成人久久影院| 97精品超碰一区二区三区| 久久精品男人的天堂| 日韩福利电影在线| 欧美精品一卡二卡| 亚洲国产精品久久人人爱| 91麻豆自制传媒国产之光| 国产精品久线在线观看| 国产成a人亚洲精| 久久蜜桃av一区二区天堂| 国产原创一区二区| 久久久国产午夜精品| 黄页视频在线91| 久久久久久久久久久黄色| 国产麻豆精品在线| 国产午夜精品福利| 成人高清视频在线观看| 中文字幕成人av| 成人ar影院免费观看视频| 中文幕一区二区三区久久蜜桃| 国产高清精品在线| 国产精品毛片无遮挡高清| 福利91精品一区二区三区| 日韩欧美在线综合网| 另类人妖一区二区av| 91精品国产一区二区人妖| 日本欧美久久久久免费播放网| 91精品福利在线一区二区三区| 日日夜夜免费精品| 精品裸体舞一区二区三区| 久久国产精品第一页| 精品国产乱码久久久久久牛牛| 国产99久久精品| 一区二区三区成人| 777午夜精品免费视频| 久久精品国产99国产| 欧美成人猛片aaaaaaa| 久久国产成人午夜av影院| 亚洲精品在线观| 成人黄色综合网站| 亚洲伊人伊色伊影伊综合网| 欧美日韩一区 二区 三区 久久精品| 亚洲女人小视频在线观看| 欧美在线小视频| 激情久久五月天| 中文字幕va一区二区三区| 91国偷自产一区二区三区成为亚洲经典 | 免费观看久久久4p| 日韩一区二区三区电影在线观看 | 亚洲精品亚洲人成人网| 在线看国产一区二区| 日韩电影在线看| 久久综合久色欧美综合狠狠| 成人夜色视频网站在线观看| 亚洲男人电影天堂| 精品福利av导航| 欧美视频三区在线播放| 福利一区二区在线| 日本不卡高清视频| 一区二区三区精品| 欧美高清在线视频| 日韩欧美亚洲另类制服综合在线 | 久久国产精品99久久久久久老狼| 久久亚洲一区二区三区四区| 成人高清av在线| 麻豆成人av在线| 亚洲妇熟xx妇色黄| 中文字幕一区免费在线观看| 337p亚洲精品色噜噜狠狠| 国产夫妻精品视频| 日精品一区二区| 国产精品午夜春色av| 欧美日韩国产天堂| 国产精品一卡二卡| 日韩综合在线视频| 亚洲视频在线一区二区| 欧美电影精品一区二区| 色哟哟国产精品免费观看| 高清beeg欧美| 美女免费视频一区二区| 亚洲欧洲精品天堂一级| 欧美成人午夜电影| 欧美理论片在线| 欧美日韩色综合| 欧美午夜精品久久久久久超碰| 成人国产精品免费观看视频| 国产激情一区二区三区四区| 美女视频一区二区| 麻豆一区二区三| 蜜桃精品视频在线| 精久久久久久久久久久| 美女视频第一区二区三区免费观看网站 | 国产精品久久久久久久久免费相片| 日韩一区二区不卡| 欧美一级日韩不卡播放免费| 欧美一区二区三区日韩| 91精品国产欧美一区二区| 欧美久久一区二区| 7777精品伊人久久久大香线蕉| 欧美日本一区二区三区四区| 欧美精品免费视频| 日韩一区二区三区视频在线| 欧美一级日韩不卡播放免费| 日韩一区二区三区av| 欧美一级片免费看| 精品对白一区国产伦| 精品国产伦一区二区三区观看方式 | www.成人在线| 久久综合成人精品亚洲另类欧美| 正在播放亚洲一区| 欧美性色黄大片| 欧美日韩免费观看一区三区| 欧美怡红院视频| 欧美日韩一本到| 欧美日韩国产影片| 精品久久国产老人久久综合| 久久久久国产精品人| 久久综合九色综合欧美亚洲| 久久先锋影音av| 久久久久久影视| 国产精品久久久久久久久搜平片 | 亚洲成人动漫在线免费观看| 日韩国产在线观看| 国产精品69久久久久水密桃| www.一区二区| 欧美精品色综合| 国产欧美日产一区| 亚洲v中文字幕| 国产一区二区三区在线观看精品 | 免费一级欧美片在线观看| 国产一区二区三区四| 色综合久久综合中文综合网| 欧美一区二区三区精品| 国产欧美日产一区| 亚洲444eee在线观看| 国产精品996| 欧美精品一卡二卡| 国产精品久久久久久久久搜平片| 日精品一区二区三区| 不卡一区在线观看| 日韩欧美国产成人一区二区| 亚洲欧美日韩中文播放| 精品综合久久久久久8888| 欧美性大战xxxxx久久久| 久久精品一区二区| 日韩成人免费电影| 色综合久久综合| 国产网站一区二区| 肉色丝袜一区二区| 在线免费观看不卡av| 欧美激情综合网| 亚洲综合图片区| 成人黄色软件下载| 欧美成人女星排行榜| 五月天婷婷综合| 91丝袜美腿高跟国产极品老师 | 亚洲电影一区二区三区| 国产传媒欧美日韩成人| 日韩一区二区麻豆国产| 亚洲一区二区三区影院| 国产精品白丝jk白祙喷水网站| 欧美在线综合视频| 亚洲视频在线一区二区| 成人永久免费视频| 精品久久久久久无| 免费成人你懂的| 欧美精品第一页| 日韩精品欧美精品| 欧美日韩视频一区二区| 一二三区精品视频| 91浏览器打开| 伊人性伊人情综合网| 99国产精品国产精品久久| 国产女主播视频一区二区| 国产成人免费av在线| 久久精品一区二区三区不卡牛牛 | 国产做a爰片久久毛片| 欧美一区二区三区婷婷月色| 亚洲成av人片| 91精品在线免费| 日韩福利视频网| 日韩欧美不卡在线观看视频| 美女视频网站久久| 精品久久久三级丝袜|