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

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

?? unzip.c

?? Borland C++BuilderT 6 Developer s Guide
?? C
?? 第 1 頁 / 共 3 頁
字號:

	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) && 
							  ((uFlags & 8)==0))
		err=UNZ_BADZIPFILE;


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

	*piSizeVar += (uInt)size_filename;

	if (unzlocal_getShort(s->file,&size_extra_field) != UNZ_OK)
		err=UNZ_ERRNO;
	*poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
									SIZEZIPLOCALHEADER + size_filename;
	*psize_local_extrafield = (uInt)size_extra_field;

	*piSizeVar += (uInt)size_extra_field;

	return err;
}
												
/*
  Open for reading data the current file in the zipfile.
  If there is no error and the file is opened, the return value is UNZ_OK.
*/
extern int ZEXPORT unzOpenCurrentFile (file)
	unzFile file;
{
	int err=UNZ_OK;
	int Store;
	uInt iSizeVar;
	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	uLong offset_local_extrafield;  /* offset of the local extra field */
	uInt  size_local_extrafield;    /* size of the local extra field */

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

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

	if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
				&offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
		return UNZ_BADZIPFILE;

	pfile_in_zip_read_info = (file_in_zip_read_info_s*)
									    ALLOC(sizeof(file_in_zip_read_info_s));
	if (pfile_in_zip_read_info==NULL)
		return UNZ_INTERNALERROR;

	pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
	pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
	pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
	pfile_in_zip_read_info->pos_local_extrafield=0;

	if (pfile_in_zip_read_info->read_buffer==NULL)
	{
		TRYFREE(pfile_in_zip_read_info);
		return UNZ_INTERNALERROR;
	}

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

	pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
	pfile_in_zip_read_info->crc32=0;
	pfile_in_zip_read_info->compression_method =
            s->cur_file_info.compression_method;
	pfile_in_zip_read_info->file=s->file;
	pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;

    pfile_in_zip_read_info->stream.total_out = 0;

	if (!Store)
	{
	  pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
	  pfile_in_zip_read_info->stream.zfree = (free_func)0;
	  pfile_in_zip_read_info->stream.opaque = (voidpf)0; 
      
	  err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
	  if (err == Z_OK)
	    pfile_in_zip_read_info->stream_initialised=1;
        /* windowBits is passed < 0 to tell that there is no zlib header.
         * Note that in this case inflate *requires* an extra "dummy" byte
         * after the compressed stream in order to complete decompression and
         * return Z_STREAM_END. 
         * In unzip, i don't wait absolutely Z_STREAM_END because I known the 
         * size of both compressed and uncompressed data
         */
	}
	pfile_in_zip_read_info->rest_read_compressed = 
            s->cur_file_info.compressed_size ;
	pfile_in_zip_read_info->rest_read_uncompressed = 
            s->cur_file_info.uncompressed_size ;

	
	pfile_in_zip_read_info->pos_in_zipfile = 
            s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + 
			  iSizeVar;
	
	pfile_in_zip_read_info->stream.avail_in = (uInt)0;


	s->pfile_in_zip_read = pfile_in_zip_read_info;
    return UNZ_OK;
}


/*
  Read bytes from the current file.
  buf contain buffer where data must be copied
  len the size of buf.

  return the number of byte copied if somes bytes are copied
  return 0 if the end of file was reached
  return <0 with error code if there is an error
    (UNZ_ERRNO for IO error, or zLib error for uncompress error)
*/
extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
	unzFile file;
	voidp buf;
	unsigned len;
{
	int err=UNZ_OK;
	uInt iRead = 0;
	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
    pfile_in_zip_read_info=s->pfile_in_zip_read;

	if (pfile_in_zip_read_info==NULL)
		return UNZ_PARAMERROR;


	if ((pfile_in_zip_read_info->read_buffer == NULL))
		return UNZ_END_OF_LIST_OF_FILE;
	if (len==0)
		return 0;

	pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;

	pfile_in_zip_read_info->stream.avail_out = (uInt)len;
	
	if (len>pfile_in_zip_read_info->rest_read_uncompressed)
		pfile_in_zip_read_info->stream.avail_out = 
		  (uInt)pfile_in_zip_read_info->rest_read_uncompressed;

	while (pfile_in_zip_read_info->stream.avail_out>0)
	{
		if ((pfile_in_zip_read_info->stream.avail_in==0) &&
            (pfile_in_zip_read_info->rest_read_compressed>0))
		{
			uInt uReadThis = UNZ_BUFSIZE;
			if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
				uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
			if (uReadThis == 0)
				return UNZ_EOF;
			if (fseek(pfile_in_zip_read_info->file,
                      pfile_in_zip_read_info->pos_in_zipfile + 
                         pfile_in_zip_read_info->byte_before_the_zipfile,SEEK_SET)!=0)
				return UNZ_ERRNO;
			if (fread(pfile_in_zip_read_info->read_buffer,uReadThis,1,
                         pfile_in_zip_read_info->file)!=1)
				return UNZ_ERRNO;
			pfile_in_zip_read_info->pos_in_zipfile += uReadThis;

			pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
			
			pfile_in_zip_read_info->stream.next_in = 
                (Bytef*)pfile_in_zip_read_info->read_buffer;
			pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
		}

		if (pfile_in_zip_read_info->compression_method==0)
		{
			uInt uDoCopy,i ;
			if (pfile_in_zip_read_info->stream.avail_out < 
                            pfile_in_zip_read_info->stream.avail_in)
				uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
			else
				uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
				
			for (i=0;i<uDoCopy;i++)
				*(pfile_in_zip_read_info->stream.next_out+i) =
                        *(pfile_in_zip_read_info->stream.next_in+i);
					
			pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
								pfile_in_zip_read_info->stream.next_out,
								uDoCopy);
			pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
			pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
			pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
			pfile_in_zip_read_info->stream.next_out += uDoCopy;
			pfile_in_zip_read_info->stream.next_in += uDoCopy;
            pfile_in_zip_read_info->stream.total_out += uDoCopy;
			iRead += uDoCopy;
		}
		else
		{
			uLong uTotalOutBefore,uTotalOutAfter;
			const Bytef *bufBefore;
			uLong uOutThis;
			int flush=Z_SYNC_FLUSH;

			uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
			bufBefore = pfile_in_zip_read_info->stream.next_out;

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

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

			pfile_in_zip_read_info->rest_read_uncompressed -=
                uOutThis;

			iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
            
			if (err==Z_STREAM_END)
				return (iRead==0) ? UNZ_EOF : iRead;
			if (err!=Z_OK) 
				break;
		}
	}

	if (err==Z_OK)
		return iRead;
	return err;
}


/*
  Give the current position in uncompressed data
*/
extern z_off_t ZEXPORT unztell (file)
	unzFile file;
{
	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
    pfile_in_zip_read_info=s->pfile_in_zip_read;

	if (pfile_in_zip_read_info==NULL)
		return UNZ_PARAMERROR;

	return (z_off_t)pfile_in_zip_read_info->stream.total_out;
}


/*
  return 1 if the end of file was reached, 0 elsewhere 
*/
extern int ZEXPORT unzeof (file)
	unzFile file;
{
	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
    pfile_in_zip_read_info=s->pfile_in_zip_read;

	if (pfile_in_zip_read_info==NULL)
		return UNZ_PARAMERROR;
	
	if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
		return 1;
	else
		return 0;
}



/*
  Read extra field from the current file (opened by unzOpenCurrentFile)
  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, or (if <0) 
	the error code
*/
extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
	unzFile file;
	voidp buf;
	unsigned len;
{
	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	uInt read_now;
	uLong size_to_read;

	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
    pfile_in_zip_read_info=s->pfile_in_zip_read;

	if (pfile_in_zip_read_info==NULL)
		return UNZ_PARAMERROR;

	size_to_read = (pfile_in_zip_read_info->size_local_extrafield - 
				pfile_in_zip_read_info->pos_local_extrafield);

	if (buf==NULL)
		return (int)size_to_read;
	
	if (len>size_to_read)
		read_now = (uInt)size_to_read;
	else
		read_now = (uInt)len ;

	if (read_now==0)
		return 0;
	
	if (fseek(pfile_in_zip_read_info->file,
              pfile_in_zip_read_info->offset_local_extrafield + 
			  pfile_in_zip_read_info->pos_local_extrafield,SEEK_SET)!=0)
		return UNZ_ERRNO;

	if (fread(buf,(uInt)size_to_read,1,pfile_in_zip_read_info->file)!=1)
		return UNZ_ERRNO;

	return (int)read_now;
}

/*
  Close the file in zip opened with unzipOpenCurrentFile
  Return UNZ_CRCERROR if all the file was read but the CRC is not good
*/
extern int ZEXPORT unzCloseCurrentFile (file)
	unzFile file;
{
	int err=UNZ_OK;

	unz_s* s;
	file_in_zip_read_info_s* pfile_in_zip_read_info;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;
    pfile_in_zip_read_info=s->pfile_in_zip_read;

	if (pfile_in_zip_read_info==NULL)
		return UNZ_PARAMERROR;


	if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
	{
		if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
			err=UNZ_CRCERROR;
	}


	TRYFREE(pfile_in_zip_read_info->read_buffer);
	pfile_in_zip_read_info->read_buffer = NULL;
	if (pfile_in_zip_read_info->stream_initialised)
		inflateEnd(&pfile_in_zip_read_info->stream);

	pfile_in_zip_read_info->stream_initialised = 0;
	TRYFREE(pfile_in_zip_read_info);

    s->pfile_in_zip_read=NULL;

	return err;
}


/*
  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 or an error code <0
*/
extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
	unzFile file;
	char *szComment;
	uLong uSizeBuf;
{
	int err=UNZ_OK;
	unz_s* s;
	uLong uReadThis ;
	if (file==NULL)
		return UNZ_PARAMERROR;
	s=(unz_s*)file;

	uReadThis = uSizeBuf;
	if (uReadThis>s->gi.size_comment)
		uReadThis = s->gi.size_comment;

	if (fseek(s->file,s->central_pos+22,SEEK_SET)!=0)
		return UNZ_ERRNO;

	if (uReadThis>0)
    {
      *szComment='\0';
	  if (fread(szComment,(uInt)uReadThis,1,s->file)!=1)
		return UNZ_ERRNO;
    }

	if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment))
		*(szComment+s->gi.size_comment)='\0';
	return (int)uReadThis;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区国产| 国产成人av一区二区三区在线观看| 狠狠色丁香婷综合久久| 在线视频一区二区三| 亚洲高清视频的网址| 欧美一区二区三区视频在线| 午夜精品视频在线观看| 国产剧情在线观看一区二区| 亚洲成人资源在线| 麻豆久久一区二区| 日本二三区不卡| 成人欧美一区二区三区黑人麻豆| 欧美一区二区成人| 久久麻豆一区二区| 91成人在线免费观看| 视频精品一区二区| 亚洲欧美一区二区在线观看| 欧美美女bb生活片| 成人综合婷婷国产精品久久蜜臀 | 91精品国产入口在线| 国产三区在线成人av| 性做久久久久久免费观看欧美| 国产资源精品在线观看| 日韩女优视频免费观看| 国产一区二区三区最好精华液| 国产精品美女一区二区在线观看| 一本色道综合亚洲| 91小视频在线免费看| 99国产精品久久久久久久久久 | 成人av资源在线| 毛片av一区二区| 午夜视频在线观看一区二区三区| 国产精品女同互慰在线看| 久久久天堂av| 欧美在线观看一区二区| 在线观看视频91| 精品婷婷伊人一区三区三| 欧美日本国产视频| 日韩一级片在线播放| 久久久美女毛片| 国产精品免费久久| 一区二区不卡在线播放| 日韩电影在线免费看| 麻豆高清免费国产一区| 国产精品996| 91久久国产综合久久| 91麻豆精品国产91久久久更新时间 | 欧美日韩精品一区二区三区| 欧美日韩国产一二三| 精品日韩99亚洲| 亚洲视频一区二区免费在线观看| 亚洲国产成人va在线观看天堂| 毛片基地黄久久久久久天堂| 粉嫩一区二区三区性色av| 欧美亚洲自拍偷拍| 久久久久久久免费视频了| 一区二区三区免费| 国产成人午夜精品5599| 欧美精品九九99久久| 国产精品素人一区二区| 免费欧美日韩国产三级电影| 国产成都精品91一区二区三| 777精品伊人久久久久大香线蕉| 国产日韩欧美精品在线| 日av在线不卡| 欧美在线你懂得| 中文字幕在线不卡国产视频| 青草国产精品久久久久久| 亚洲香肠在线观看| 视频一区二区不卡| 首页国产欧美日韩丝袜| 亚洲另类中文字| 亚洲国产综合91精品麻豆| 国产**成人网毛片九色 | 国产成人免费xxxxxxxx| 成人晚上爱看视频| 欧美影院一区二区三区| 日韩精品专区在线| 中文字幕在线视频一区| 亚洲国产视频一区| 狠狠色丁香婷婷综合| 91亚洲精品乱码久久久久久蜜桃| 欧美视频一区在线观看| 精品成人私密视频| 一区二区三区在线观看网站| 日韩国产欧美在线播放| 国产乱妇无码大片在线观看| 色88888久久久久久影院按摩| 91精品国产品国语在线不卡 | 亚洲18女电影在线观看| 国产乱子伦一区二区三区国色天香| a在线播放不卡| 欧美一级一级性生活免费录像| 国产欧美一区二区三区沐欲| 亚洲韩国精品一区| 国产91精品一区二区麻豆亚洲| 在线观看91视频| 欧美激情在线观看视频免费| 一区二区三区四区在线| 国产福利一区在线观看| 欧美日韩激情一区二区| 中文字幕一区二区三区av| 美国一区二区三区在线播放| 91看片淫黄大片一级| 久久久亚洲午夜电影| 日韩综合小视频| 色综合色狠狠综合色| 久久久久久久久久久电影| 人禽交欧美网站| 欧美亚洲国产一卡| 国产精品久久久久久久久免费相片| 日韩av电影免费观看高清完整版在线观看 | 国产日韩高清在线| 日本美女视频一区二区| 欧洲av在线精品| 国产精品国产三级国产| 国产在线视频不卡二| 欧美一区永久视频免费观看| 亚洲自拍偷拍综合| 95精品视频在线| 国产日产亚洲精品系列| 国内成+人亚洲+欧美+综合在线| 欧美日韩久久一区二区| 亚洲视频香蕉人妖| www.日韩在线| 中文字幕免费不卡| 国产一区二区三区免费观看| 欧美一激情一区二区三区| 亚洲国产精品精华液网站| 色欧美片视频在线观看 | 麻豆高清免费国产一区| 91精品国产高清一区二区三区蜜臀| 亚洲欧美成aⅴ人在线观看| 成人国产一区二区三区精品| 精品蜜桃在线看| 美女看a上一区| 日韩免费观看高清完整版| 免费国产亚洲视频| 日韩一区二区免费在线观看| 亚洲成人av电影| 欧美久久久影院| 日韩国产精品久久| 欧美一级欧美三级| 久久精品国产网站| 精品国产一区a| 国产一区二区伦理| 国产免费成人在线视频| 成人网男人的天堂| 亚洲欧美日韩精品久久久久| 一本色道久久综合精品竹菊| 亚洲日本成人在线观看| 色婷婷精品久久二区二区蜜臂av| 国产精品久久久久桃色tv| 成人免费毛片app| 中文字幕在线免费不卡| 色综合中文字幕国产 | 日韩成人dvd| 精品剧情v国产在线观看在线| 精品一区二区在线播放| 国产欧美一区二区三区鸳鸯浴| 丁香六月综合激情| 国产精品免费网站在线观看| eeuss国产一区二区三区| 一个色在线综合| 欧美一区二区精美| 国产91在线观看| 亚洲精品久久嫩草网站秘色| av爱爱亚洲一区| 亚洲另类一区二区| 欧美一区二区视频免费观看| 激情偷乱视频一区二区三区| 日本一区二区成人| 欧美私人免费视频| 日本视频免费一区| 91精品国产综合久久国产大片| 欧美一区二区三区不卡| 欧美日韩国产一区二区三区地区| 免费成人美女在线观看.| 成人在线视频一区| 欧美性极品少妇| 久久亚洲精精品中文字幕早川悠里| 国产欧美日韩在线| 日韩中文字幕亚洲一区二区va在线 | 精品少妇一区二区| 成人av片在线观看| 色综合天天做天天爱| 91影院在线观看| 337p日本欧洲亚洲大胆色噜噜| 一卡二卡欧美日韩| 肉肉av福利一精品导航| 成人精品高清在线| 国产精品乱人伦一区二区| 一本大道久久精品懂色aⅴ| 国产夜色精品一区二区av| 亚洲精品中文字幕在线观看| 亚洲3atv精品一区二区三区| 亚洲成人精品影院| 国产盗摄视频一区二区三区| 99久久国产综合精品色伊| 欧美亚洲高清一区二区三区不卡|