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

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

?? unzip.cpp

?? 這是CODEPROJECT上的zip壓縮解壓代碼
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tchar.h>
#include "unzip.h"

// 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)

/*
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;


// 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);
typedef void   (*free_func)  (voidpf opaque, voidpf address);

struct internal_state;

typedef struct z_stream_s {
    Byte    *next_in;  // next input byte
    uInt     avail_in;  // number of bytes available at next_in
    uLong    total_in;  // total nb of input bytes read so far

    Byte    *next_out; // next output byte should be put there
    uInt     avail_out; // remaining free space at next_out
    uLong    total_out; // total nb of bytes output so far

    char     *msg;      // last error message, NULL if no error
    struct internal_state *state; // not visible by applications

    alloc_func zalloc;  // used to allocate the internal state
    free_func  zfree;   // used to free the internal state
    voidpf     opaque;  // private data object passed to zalloc and zfree

    int     data_type;  // best guess about the data type: ascii or binary
    uLong   adler;      // adler32 value of the uncompressed data
    uLong   reserved;   // reserved for future use
} z_stream;

typedef z_stream *z_streamp;


//   The application must update next_in and avail_in when avail_in has
//   dropped to zero. It must update next_out and avail_out when avail_out
//   has dropped to zero. The application must initialize zalloc, zfree and
//   opaque before calling the init function. All other fields are set by the
//   compression library and must not be updated by the application.
//
//   The opaque value provided by the application will be passed as the first
//   parameter for calls of zalloc and zfree. This can be useful for custom
//   memory management. The compression library attaches no meaning to the
//   opaque value.
//
//   zalloc must return Z_NULL if there is not enough memory for the object.
//   If zlib is used in a multi-threaded application, zalloc and zfree must be
//   thread safe.
//
//   The fields total_in and total_out can be used for statistics or
//   progress reports. After compression, total_in holds the total size of
//   the uncompressed data and may be saved for use in the decompressor
//   (particularly if the decompressor wants to decompress everything in
//   a single step).
//


// basic functions

const char *zlibVersion ();
// The application can compare zlibVersion and ZLIB_VERSION for consistency.
// If the first character differs, the library code actually used is
// not compatible with the zlib.h header file used by the application.
// This check is automatically made by inflateInit.






int inflate (z_streamp strm, int flush);
//
//    inflate decompresses as much data as possible, and stops when the input
//  buffer becomes empty or the output buffer becomes full. It may some
//  introduce some output latency (reading input without producing any output)
//  except when forced to flush.
//
//  The detailed semantics are as follows. inflate performs one or both of the
//  following actions:
//
//  - Decompress more input starting at next_in and update next_in and avail_in
//    accordingly. If not all input can be processed (because there is not
//    enough room in the output buffer), next_in is updated and processing
//    will resume at this point for the next call of inflate().
//
//  - Provide more output starting at next_out and update next_out and avail_out
//    accordingly.  inflate() provides as much output as possible, until there
//    is no more input data or no more space in the output buffer (see below
//    about the flush parameter).
//
//  Before the call of inflate(), the application should ensure that at least
//  one of the actions is possible, by providing more input and/or consuming
//  more output, and updating the next_* and avail_* values accordingly.
//  The application can consume the uncompressed output when it wants, for
//  example when the output buffer is full (avail_out == 0), or after each
//  call of inflate(). If inflate returns Z_OK and with zero avail_out, it
//  must be called again after making room in the output buffer because there
//  might be more output pending.
//
//    If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much
//  output as possible to the output buffer. The flushing behavior of inflate is
//  not specified for values of the flush parameter other than Z_SYNC_FLUSH
//  and Z_FINISH, but the current implementation actually flushes as much output
//  as possible anyway.
//
//    inflate() should normally be called until it returns Z_STREAM_END or an
//  error. However if all decompression is to be performed in a single step
//  (a single call of inflate), the parameter flush should be set to
//  Z_FINISH. In this case all pending input is processed and all pending
//  output is flushed; avail_out must be large enough to hold all the
//  uncompressed data. (The size of the uncompressed data may have been saved
//  by the compressor for this purpose.) The next operation on this stream must
//  be inflateEnd to deallocate the decompression state. The use of Z_FINISH
//  is never required, but can be used to inform inflate that a faster routine
//  may be used for the single inflate() call.
//
//     If a preset dictionary is needed at this point (see inflateSetDictionary
//  below), inflate sets strm-adler to the adler32 checksum of the
//  dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise
//  it sets strm->adler to the adler32 checksum of all output produced
//  so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲第一综合色| 播五月开心婷婷综合| 国产欧美视频一区二区| 欧美午夜片在线看| 成人网在线免费视频| 日本一区中文字幕| 一区二区三区资源| 国产精品欧美综合在线| 日韩欧美中文字幕公布| 欧美亚洲一区二区三区四区| 成人动漫一区二区三区| 免费观看日韩电影| 亚洲小少妇裸体bbw| 国产精品久久福利| 国产丝袜欧美中文另类| 欧美一级一级性生活免费录像| 色综合网站在线| 丰满亚洲少妇av| 国产专区综合网| 麻豆精品精品国产自在97香蕉| 一区二区三区日韩精品视频| 中文字幕+乱码+中文字幕一区| 欧美精品一区二区三区四区| 91精品国产色综合久久不卡电影| 日本精品一级二级| 91视频免费播放| 成人91在线观看| 国产成人免费在线视频| 国产一区激情在线| 狠狠色狠狠色综合日日91app| 美日韩一级片在线观看| 日韩精品久久久久久| 亚洲aaa精品| 亚洲成人免费在线观看| 亚洲成人午夜影院| 亚洲电影欧美电影有声小说| 亚洲二区在线观看| 石原莉奈一区二区三区在线观看| 亚洲成人av资源| 丝袜亚洲另类欧美综合| 日韩有码一区二区三区| 日产欧产美韩系列久久99| 免费精品99久久国产综合精品| 午夜影院久久久| 蜜臀a∨国产成人精品| 日本不卡视频在线| 久草中文综合在线| 国产成人aaa| eeuss鲁片一区二区三区 | 丝袜亚洲另类欧美| 亚洲成a人片在线不卡一二三区 | 亚洲欧洲日韩女同| 亚洲精品成人a在线观看| 亚洲制服丝袜av| 视频一区二区欧美| 韩日av一区二区| 成人一区二区三区视频在线观看| 成人国产免费视频| 91黄视频在线| 日韩一区二区精品葵司在线| 久久免费午夜影院| 中文字幕在线观看一区二区| 亚洲综合色视频| 久久精品国产99久久6| 国产成人一区在线| 一本色道久久综合亚洲精品按摩| 欧美性生活大片视频| 91精品国产美女浴室洗澡无遮挡| 精品久久久久久综合日本欧美 | 日本中文一区二区三区| 国产原创一区二区| 色综合久久中文字幕综合网| 欧美情侣在线播放| 久久久99精品久久| 亚洲一区二区在线免费看| 久久国产福利国产秒拍| 99精品久久只有精品| 欧美丰满少妇xxxxx高潮对白| 欧美精品一区二区三区视频| 亚洲人成精品久久久久| 男男gaygay亚洲| 99国产精品一区| 欧美本精品男人aⅴ天堂| 国产精品理论片在线观看| 婷婷综合五月天| 懂色av中文字幕一区二区三区| 欧美视频精品在线观看| 久久影院电视剧免费观看| 亚洲日本va午夜在线电影| 狠狠色丁香久久婷婷综| 欧洲日韩一区二区三区| 久久精品亚洲国产奇米99| 亚洲国产精品一区二区久久恐怖片 | av一二三不卡影片| 日韩欧美国产不卡| 一区二区三区免费看视频| 国产精品一区一区三区| 欧美制服丝袜第一页| 久久九九影视网| 人人精品人人爱| 欧洲av在线精品| 国产精品女同互慰在线看| 久久99国产精品免费网站| 日本韩国一区二区三区视频| 久久久精品综合| 免费久久精品视频| 欧美性色欧美a在线播放| 国产女主播在线一区二区| 美洲天堂一区二卡三卡四卡视频| 91女厕偷拍女厕偷拍高清| 久久天天做天天爱综合色| 首页亚洲欧美制服丝腿| 91官网在线观看| 亚洲欧洲成人av每日更新| 国产盗摄女厕一区二区三区 | 亚洲三级在线免费| 国产91丝袜在线播放0| 久久久欧美精品sm网站| 欧美96一区二区免费视频| 欧美日韩高清在线| 亚洲成人综合在线| 欧美亚日韩国产aⅴ精品中极品| 国产精品国产精品国产专区不片| 国产麻豆视频一区| 欧美精品一区二区三区一线天视频| 五月激情丁香一区二区三区| 欧美三级日本三级少妇99| 亚洲精品日韩专区silk| av电影天堂一区二区在线观看| 国产欧美综合在线| 国产成人精品1024| 国产蜜臀av在线一区二区三区| 蜜臀a∨国产成人精品| 欧美大片国产精品| 久久99精品国产麻豆婷婷| 欧美大黄免费观看| 伦理电影国产精品| 久久网站热最新地址| 国产一区二区不卡在线| 欧美激情一区二区三区全黄| 粉嫩av亚洲一区二区图片| 中文字幕一区二区三区四区| eeuss国产一区二区三区| 亚洲欧美国产毛片在线| 91免费看视频| 亚洲午夜免费电影| 欧美一区二区三区视频免费播放| 日韩av一二三| 久久婷婷国产综合国色天香| 国产成人综合自拍| 国产精品久久久久7777按摩| 色婷婷精品久久二区二区蜜臀av | 久久久99精品免费观看| 成人午夜在线免费| 亚洲欧美经典视频| 欧美色图激情小说| 青青草国产精品97视觉盛宴| 久久影院午夜片一区| 成人福利电影精品一区二区在线观看| 国产精品久久久久9999吃药| 91久久精品一区二区三区| 亚洲成va人在线观看| 精品91自产拍在线观看一区| 国产a区久久久| 亚洲伦理在线精品| 日韩视频免费观看高清完整版在线观看 | 欧洲精品一区二区| 免费成人结看片| 国产亚洲短视频| 色婷婷激情久久| 奇米色777欧美一区二区| 国产亚洲欧美日韩俺去了| 色一情一伦一子一伦一区| 日韩精品亚洲专区| 亚洲国产精品成人综合| 欧美三区在线观看| 美女性感视频久久| 国产精品国产三级国产有无不卡| 在线中文字幕一区| 国产一区二区三区免费| 一区二区三区日韩欧美精品| 欧美电影免费观看高清完整版在线| k8久久久一区二区三区| 日本午夜一本久久久综合| 中文字幕亚洲区| 日韩一区二区麻豆国产| 91丝袜国产在线播放| 日av在线不卡| 亚洲乱码国产乱码精品精可以看| 日韩视频在线永久播放| 日本韩国精品在线| 国产资源精品在线观看| 亚洲18女电影在线观看| 亚洲欧洲无码一区二区三区| 日韩精品一区二区三区中文精品| 91美女在线看| 国产毛片精品一区| 青青草国产成人99久久| 夜夜精品视频一区二区| 国产欧美日韩综合精品一区二区|