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

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

?? unzip.cpp

?? 泡泡堂單機版(含ASL游戲引擎源碼 泡泡堂單機版(含ASL游戲引擎源碼
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
#ifdef ZIP_STD
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <time.h>
#ifdef _MSC_VER
#include <sys/utime.h> // microsoft puts it here
#else
#include <utime.h>
#endif
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)
#include <direct.h>#define lumkdir(t) (mkdir(t))#else#include <unistd.h>#define lumkdir(t) (mkdir(t,0755))#endif#include <sys/types.h>
#include <sys/stat.h>
#include "unzip.h"
//
typedef unsigned short WORD;
#define _tcslen strlen
#define _tcsicmp stricmp
#define _tcsncpy strncpy
#define _tcsstr strstr
#define INVALID_HANDLE_VALUE 0
#ifndef _T
#define _T(s) s
#endif
#ifndef S_IWUSR
#define S_IWUSR 0000200
#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
#endif
//
#else
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tchar.h>
#include "unzip.h"
#endif
//
#ifdef UNICODE
#define _tsprintf swprintf
#else
#define _tsprintf sprintf
#endif


// THIS FILE is almost entirely based upon code by Jean-loup Gailly
// and Mark Adler. It has been modified by Lucian Wischik.
// The modifications were: incorporate the bugfixes of 1.1.4, allow
// unzipping to/from handles/pipes/files/memory, encryption, unicode,
// a windowsish api, and putting everything into a single .cpp file.
// The original code may be found at http://www.gzip.org/zlib/
// The original copyright text follows.
//
//
//
// zlib.h -- interface of the 'zlib' general purpose compression library
//  version 1.1.3, July 9th, 1998
//
//  Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
//
//  This software is provided 'as-is', without any express or implied
//  warranty.  In no event will the authors be held liable for any damages
//  arising from the use of this software.
//
//  Permission is granted to anyone to use this software for any purpose,
//  including commercial applications, and to alter it and redistribute it
//  freely, subject to the following restrictions:
//
//  1. The origin of this software must not be misrepresented; you must not
//     claim that you wrote the original software. If you use this software
//     in a product, an acknowledgment in the product documentation would be
//     appreciated but is not required.
//  2. Altered source versions must be plainly marked as such, and must not be
//     misrepresented as being the original software.
//  3. This notice may not be removed or altered from any source distribution.
//
//  Jean-loup Gailly        Mark Adler
//  jloup@gzip.org          madler@alumni.caltech.edu
//
//
//  The data format used by the zlib library is described by RFCs (Request for
//  Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt
//  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
//
//
//     The 'zlib' compression library provides in-memory compression and
//  decompression functions, including integrity checks of the uncompressed
//  data.  This version of the library supports only one compression method
//  (deflation) but other algorithms will be added later and will have the same
//  stream interface.
//
//     Compression can be done in a single step if the buffers are large
//  enough (for example if an input file is mmap'ed), or can be done by
//  repeated calls of the compression function.  In the latter case, the
//  application must provide more input and/or consume the output
//  (providing more output space) before each call.
//
//     The library also supports reading and writing files in gzip (.gz) format
//  with an interface similar to that of stdio.
//
//     The library does not install any signal handler. The decoder checks
//  the consistency of the compressed data, so the library should never
//  crash even in case of corrupted input.
//
// for more info about .ZIP format, see ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip
//   PkWare has also a specification at ftp://ftp.pkware.com/probdesc.zip

#define ZIP_HANDLE   1
#define ZIP_FILENAME 2
#define ZIP_MEMORY   3


#define zmalloc(len) malloc(len)

#define zfree(p) free(p)

typedef unsigned long lutime_t;       // define it ourselves since we don't include time.h

/*
void *zmalloc(unsigned int len)
{ char *buf = new char[len+32];
  for (int i=0; i<16; i++)
  { buf[i]=i;
    buf[len+31-i]=i;
  }
  *((unsigned int*)buf) = len;
  char c[1000]; wsprintf(c,"malloc 0x%lx  - %lu",buf+16,len);
  OutputDebugString(c);
  return buf+16;
}

void zfree(void *buf)
{ char c[1000]; wsprintf(c,"free   0x%lx",buf);
  OutputDebugString(c);
  char *p = ((char*)buf)-16;
  unsigned int len = *((unsigned int*)p);
  bool blown=false;
  for (int i=0; i<16; i++)
  { char lo = p[i];
    char hi = p[len+31-i];
    if (hi!=i || (lo!=i && i>4)) blown=true;
  }
  if (blown)
  { OutputDebugString("BLOWN!!!");
  }
  delete[] p;
}
*/


typedef struct tm_unz_s
{ unsigned int tm_sec;            // seconds after the minute - [0,59]
  unsigned int tm_min;            // minutes after the hour - [0,59]
  unsigned int tm_hour;           // hours since midnight - [0,23]
  unsigned int tm_mday;           // day of the month - [1,31]
  unsigned int tm_mon;            // months since January - [0,11]
  unsigned int tm_year;           // years - [1980..2044]
} tm_unz;



// ----------------------------------------------------------------------
// some windows<->linux portability things
#ifdef ZIP_STD
DWORD GetFilePosU(HANDLE hfout)
{ struct stat st; fstat(fileno(hfout),&st);
  if ((st.st_mode&S_IFREG)==0) return 0xFFFFFFFF;
  return ftell(hfout);
}

bool FileExists(const TCHAR *fn)
{ struct stat st;
  int res=stat(fn,&st);
  return (res==0);
}

FILETIME dosdatetime2filetime(WORD dosdate,WORD dostime)
{ struct tm t;
  t.tm_year = (WORD)(((dosdate>>9)&0x7f) + 1980 - 1900);
  t.tm_isdst = -1;
  t.tm_mon = (WORD)((dosdate>>5)&0xf - 1);
  t.tm_mday = (WORD)(dosdate&0x1f);
  t.tm_hour = (WORD)((dostime>>11)&0x1f);
  t.tm_min = (WORD)((dostime>>5)&0x3f);
  t.tm_sec = (WORD)((dostime&0x1f)*2);
  time_t t2 = mktime(&t);
  return t2;
}

void LocalFileTimeToFileTime(FILETIME *lft, FILETIME *ft)
{ *ft = *lft;
}

FILETIME timet2filetime(const lutime_t t)
{ return t;
}

#else
// ----------------------------------------------------------------------
DWORD GetFilePosU(HANDLE hfout)
{ return SetFilePointer(hfout,0,0,FILE_CURRENT);
}

FILETIME timet2filetime(const lutime_t t)
{ LONGLONG i = Int32x32To64(t,10000000) + 116444736000000000LL;
  FILETIME ft;
  ft.dwLowDateTime = (DWORD) i;
  ft.dwHighDateTime = (DWORD)(i >>32);
  return ft;
}

FILETIME dosdatetime2filetime(WORD dosdate,WORD dostime)
{ // date: bits 0-4 are day of month 1-31. Bits 5-8 are month 1..12. Bits 9-15 are year-1980
  // time: bits 0-4 are seconds/2, bits 5-10 are minute 0..59. Bits 11-15 are hour 0..23
  SYSTEMTIME st;
  st.wYear = (WORD)(((dosdate>>9)&0x7f) + 1980);
  st.wMonth = (WORD)((dosdate>>5)&0xf);
  st.wDay = (WORD)(dosdate&0x1f);
  st.wHour = (WORD)((dostime>>11)&0x1f);
  st.wMinute = (WORD)((dostime>>5)&0x3f);
  st.wSecond = (WORD)((dostime&0x1f)*2);
  st.wMilliseconds = 0;
  FILETIME ft; SystemTimeToFileTime(&st,&ft);
  return ft;
}

bool FileExists(const TCHAR *fn)
{ return (GetFileAttributes(fn)!=0xFFFFFFFF);
}
#endif
// ----------------------------------------------------------------------



// unz_global_info structure contain global data about the ZIPfile
typedef struct unz_global_info_s
{ unsigned long number_entry;         // total number of entries in the central dir on this disk
  unsigned long size_comment;         // size of the global comment of the zipfile
} unz_global_info;

// unz_file_info contain information about a file in the zipfile
typedef struct unz_file_info_s
{ unsigned long version;              // version made by                 2 bytes
  unsigned long version_needed;       // version needed to extract       2 bytes
  unsigned long flag;                 // general purpose bit flag        2 bytes
  unsigned long compression_method;   // compression method              2 bytes
  unsigned long dosDate;              // last mod file date in Dos fmt   4 bytes
  unsigned long crc;                  // crc-32                          4 bytes
  unsigned long compressed_size;      // compressed size                 4 bytes
  unsigned long uncompressed_size;    // uncompressed size               4 bytes
  unsigned long size_filename;        // filename length                 2 bytes
  unsigned long size_file_extra;      // extra field length              2 bytes
  unsigned long size_file_comment;    // file comment length             2 bytes
  unsigned long disk_num_start;       // disk number start               2 bytes
  unsigned long internal_fa;          // internal file attributes        2 bytes
  unsigned long external_fa;          // external file attributes        4 bytes
  tm_unz tmu_date;
} unz_file_info;


#define UNZ_OK                  (0)
#define UNZ_END_OF_LIST_OF_FILE (-100)
#define UNZ_ERRNO               (Z_ERRNO)
#define UNZ_EOF                 (0)
#define UNZ_PARAMERROR          (-102)
#define UNZ_BADZIPFILE          (-103)
#define UNZ_INTERNALERROR       (-104)
#define UNZ_CRCERROR            (-105)
#define UNZ_PASSWORD            (-106)







#define ZLIB_VERSION "1.1.3"


// Allowed flush values; see deflate() for details
#define Z_NO_FLUSH      0
#define Z_SYNC_FLUSH    2
#define Z_FULL_FLUSH    3
#define Z_FINISH        4


// compression levels
#define Z_NO_COMPRESSION         0
#define Z_BEST_SPEED             1
#define Z_BEST_COMPRESSION       9
#define Z_DEFAULT_COMPRESSION  (-1)

// compression strategy; see deflateInit2() for details
#define Z_FILTERED            1
#define Z_HUFFMAN_ONLY        2
#define Z_DEFAULT_STRATEGY    0

// Possible values of the data_type field
#define Z_BINARY   0
#define Z_ASCII    1
#define Z_UNKNOWN  2

// The deflate compression method (the only one supported in this version)
#define Z_DEFLATED   8

// for initializing zalloc, zfree, opaque
#define Z_NULL  0

// case sensitivity when searching for filenames
#define CASE_SENSITIVE 1
#define CASE_INSENSITIVE 2


// Return codes for the compression/decompression functions. Negative
// values are errors, positive values are used for special but normal events.
#define Z_OK            0
#define Z_STREAM_END    1
#define Z_NEED_DICT     2
#define Z_ERRNO        (-1)
#define Z_STREAM_ERROR (-2)
#define Z_DATA_ERROR   (-3)
#define Z_MEM_ERROR    (-4)
#define Z_BUF_ERROR    (-5)
#define Z_VERSION_ERROR (-6)



// Basic data types
typedef unsigned char  Byte;  // 8 bits
typedef unsigned int   uInt;  // 16 bits or more
typedef unsigned long  uLong; // 32 bits or more
typedef void *voidpf;
typedef void     *voidp;
typedef long z_off_t;












typedef voidpf (*alloc_func) (voidpf opaque, uInt items, uInt size);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久三级| 中文无字幕一区二区三区| 国产一区二区精品久久99| 亚洲精品第1页| 国产欧美一区二区在线| 91精品国产手机| 99精品国产99久久久久久白柏| 免费亚洲电影在线| 亚洲高清免费观看| 国产精品乱人伦| 久久日韩精品一区二区五区| 在线一区二区视频| av在线不卡网| 粉嫩一区二区三区性色av| 蜜臀久久久99精品久久久久久| 亚洲摸摸操操av| 久久亚区不卡日本| 欧美精品1区2区| 在线免费观看日本欧美| 成人av电影在线观看| 加勒比av一区二区| 青娱乐精品在线视频| 亚洲综合成人在线视频| 自拍偷拍国产亚洲| 国产精品久久久久桃色tv| 久久综合国产精品| 精品久久久久久久久久久院品网| 欧美日韩精品免费| 在线免费观看日本欧美| 一本到不卡免费一区二区| www.亚洲色图.com| youjizz久久| 成人av在线一区二区| 国产aⅴ精品一区二区三区色成熟| 久久se这里有精品| 六月婷婷色综合| 麻豆精品视频在线观看| 美女精品一区二区| 韩国av一区二区三区| 久久精品99久久久| 国产中文字幕一区| 国产美女精品一区二区三区| 精品无人码麻豆乱码1区2区| 久久se精品一区二区| 久久国产精品色婷婷| 国产揄拍国内精品对白| 国产乱码精品一区二区三| 国产精品综合二区| 成人免费毛片app| caoporen国产精品视频| 91污在线观看| 欧美日本在线播放| 欧美一区三区四区| 久久综合九色欧美综合狠狠 | 91伊人久久大香线蕉| k8久久久一区二区三区| 91在线一区二区三区| 欧美视频自拍偷拍| 制服.丝袜.亚洲.中文.综合| 欧美tk丨vk视频| 久久精品一区二区三区不卡| 中文一区在线播放| 亚洲综合在线免费观看| 天天综合色天天| 精品一区二区av| 成人久久久精品乱码一区二区三区| 99精品久久免费看蜜臀剧情介绍| 欧美在线一二三| 欧美成人精品二区三区99精品| 久久久夜色精品亚洲| 自拍偷拍欧美精品| 奇米精品一区二区三区四区| 国产综合久久久久久鬼色| 成人一区二区三区| 欧美日韩国产精选| 久久综合九色综合欧美亚洲| 亚洲欧美韩国综合色| 日韩av一级片| 成人蜜臀av电影| 欧美日韩1区2区| 国产视频在线观看一区二区三区 | 婷婷中文字幕综合| 国产精品一区二区久激情瑜伽 | 日韩福利视频导航| 丁香激情综合五月| 欧美一区中文字幕| 亚洲素人一区二区| 精品亚洲欧美一区| 欧美视频一区二| 中文字幕av一区二区三区高| 午夜精品福利一区二区三区蜜桃| 国产在线精品一区二区夜色| 在线一区二区三区| 亚洲综合999| 国内久久精品视频| 欧美色网一区二区| 国产精品久久久久久久久快鸭 | 中文字幕欧美国产| 欧美bbbbb| 91免费观看国产| 久久人人爽爽爽人久久久| 亚洲大片在线观看| 99久久伊人网影院| 精品国产乱码久久久久久1区2区| 一区二区三区日韩在线观看| 国产伦理精品不卡| 91精品福利在线一区二区三区| 亚洲女同ⅹxx女同tv| 国产成人夜色高潮福利影视| 日韩视频在线观看一区二区| 一区二区三区精品| www.久久精品| 亚洲国产精品av| 国产一区二区三区四区五区美女 | 欧美妇女性影城| 亚洲欧美一区二区三区极速播放 | 国内外精品视频| 777精品伊人久久久久大香线蕉| 亚洲天堂免费看| caoporn国产精品| 国产亚洲精品bt天堂精选| 狠狠色狠狠色综合系列| 欧美一区二区三区日韩| 一区二区在线观看不卡| av午夜精品一区二区三区| 欧美国产欧美综合| 国产精品亚洲第一| 26uuu精品一区二区| 美女视频免费一区| 日韩精品一区二区三区四区视频| 不卡的电影网站| 国产视频一区在线播放| 国产成人精品1024| 亚洲国产精品精华液2区45| 国产精品一区二区视频| 久久精品人人做人人爽97| 国产精品亚洲视频| 中文一区二区完整视频在线观看| 国产精品亚洲第一| 欧美激情在线观看视频免费| 成人综合在线网站| 自拍偷拍国产亚洲| 色丁香久综合在线久综合在线观看| 亚洲精品视频在线观看网站| 在线精品视频一区二区三四| 亚洲黄色录像片| 欧美麻豆精品久久久久久| 日韩av网站免费在线| 日韩美女天天操| 国产a区久久久| 亚洲伦理在线精品| 7777精品久久久大香线蕉 | 亚洲444eee在线观看| 欧美精品自拍偷拍| 麻豆成人在线观看| 国产日本亚洲高清| 色综合夜色一区| 日本在线播放一区二区三区| 日韩精品一区二区三区中文不卡| 美国av一区二区| 国产精品国产三级国产aⅴ无密码| 99久久er热在这里只有精品66| 亚洲黄色在线视频| 欧美电影免费观看完整版| 国产精品一区在线| 亚洲激情自拍视频| 日韩小视频在线观看专区| 国产精品一二三在| 一级中文字幕一区二区| 欧美一区二区三区四区五区| 91麻豆精品国产无毒不卡在线观看| 日本一不卡视频| 国产精品无遮挡| 欧美精品第1页| 国产激情一区二区三区四区 | 欧美日韩国产乱码电影| 国产一区美女在线| 亚洲黄色小视频| 久久先锋资源网| 欧洲一区二区三区在线| 久久精品999| 一区2区3区在线看| 久久综合久久综合久久综合| 在线视频你懂得一区二区三区| 激情综合色播激情啊| 亚洲一区二区三区精品在线| 精品久久一区二区| 欧美亚洲一区三区| 国产精品1024| 麻豆免费精品视频| 亚洲精品欧美在线| 国产三级精品视频| 6080午夜不卡| 色综合天天综合给合国产| 激情综合色播五月| 视频一区二区三区中文字幕| 国产精品久久久久影视| 日韩欧美高清一区| 欧美日韩一区在线观看| 成人av资源在线观看|