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

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

?? gzappend.c

?? StormLib是對MPQ文件進行處理的庫 MPQ是暴雪公司的私有的一種壓縮格式
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* gzappend -- command to append to a gzip file  Copyright (C) 2003 Mark Adler, all rights reserved  version 1.1, 4 Nov 2003  This software is provided 'as-is', without any express or implied  warranty.  In no event will the author 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.  Mark Adler    madler@alumni.caltech.edu *//* * Change history: * * 1.0  19 Oct 2003     - First version * 1.1   4 Nov 2003     - Expand and clarify some comments and notes *                      - Add version and copyright to help *                      - Send help to stdout instead of stderr *                      - Add some preemptive typecasts *                      - Add L to constants in lseek() calls *                      - Remove some debugging information in error messages *                      - Use new data_type definition for zlib 1.2.1 *                      - Simplfy and unify file operations *                      - Finish off gzip file in gztack() *                      - Use deflatePrime() instead of adding empty blocks *                      - Keep gzip file clean on appended file read errors *                      - Use in-place rotate instead of auxiliary buffer *                        (Why you ask?  Because it was fun to write!) *//*   gzappend takes a gzip file and appends to it, compressing files from the   command line or data from stdin.  The gzip file is written to directly, to   avoid copying that file, in case it's large.  Note that this results in the   unfriendly behavior that if gzappend fails, the gzip file is corrupted.   This program was written to illustrate the use of the new Z_BLOCK option of   zlib 1.2.x's inflate() function.  This option returns from inflate() at each   block boundary to facilitate locating and modifying the last block bit at   the start of the final deflate block.  Also whether using Z_BLOCK or not,   another required feature of zlib 1.2.x is that inflate() now provides the   number of unusued bits in the last input byte used.  gzappend will not work   with versions of zlib earlier than 1.2.1.   gzappend first decompresses the gzip file internally, discarding all but   the last 32K of uncompressed data, and noting the location of the last block   bit and the number of unused bits in the last byte of the compressed data.   The gzip trailer containing the CRC-32 and length of the uncompressed data   is verified.  This trailer will be later overwritten.   Then the last block bit is cleared by seeking back in the file and rewriting   the byte that contains it.  Seeking forward, the last byte of the compressed   data is saved along with the number of unused bits to initialize deflate.   A deflate process is initialized, using the last 32K of the uncompressed   data from the gzip file to initialize the dictionary.  If the total   uncompressed data was less than 32K, then all of it is used to initialize   the dictionary.  The deflate output bit buffer is also initialized with the   last bits from the original deflate stream.  From here on, the data to   append is simply compressed using deflate, and written to the gzip file.   When that is complete, the new CRC-32 and uncompressed length are written   as the trailer of the gzip file. */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <fcntl.h>#include <unistd.h>#include "zlib.h"#define local static#define LGCHUNK 14#define CHUNK (1U << LGCHUNK)#define DSIZE 32768U/* print an error message and terminate with extreme prejudice */local void bye(char *msg1, char *msg2){    fprintf(stderr, "gzappend error: %s%s\n", msg1, msg2);    exit(1);}/* return the greatest common divisor of a and b using Euclid's algorithm,   modified to be fast when one argument much greater than the other, and   coded to avoid unnecessary swapping */local unsigned gcd(unsigned a, unsigned b){    unsigned c;    while (a && b)        if (a > b) {            c = b;            while (a - c >= c)                c <<= 1;            a -= c;        }        else {            c = a;            while (b - c >= c)                c <<= 1;            b -= c;        }    return a + b;}/* rotate list[0..len-1] left by rot positions, in place */local void rotate(unsigned char *list, unsigned len, unsigned rot){    unsigned char tmp;    unsigned cycles;    unsigned char *start, *last, *to, *from;    /* normalize rot and handle degenerate cases */    if (len < 2) return;    if (rot >= len) rot %= len;    if (rot == 0) return;    /* pointer to last entry in list */    last = list + (len - 1);    /* do simple left shift by one */    if (rot == 1) {        tmp = *list;        memcpy(list, list + 1, len - 1);        *last = tmp;        return;    }    /* do simple right shift by one */    if (rot == len - 1) {        tmp = *last;        memmove(list + 1, list, len - 1);        *list = tmp;        return;    }    /* otherwise do rotate as a set of cycles in place */    cycles = gcd(len, rot);             /* number of cycles */    do {        start = from = list + cycles;   /* start index is arbitrary */        tmp = *from;                    /* save entry to be overwritten */        for (;;) {            to = from;                  /* next step in cycle */            from += rot;                /* go right rot positions */            if (from > last) from -= len;   /* (pointer better not wrap) */            if (from == start) break;   /* all but one shifted */            *to = *from;                /* shift left */        }        *to = tmp;                      /* complete the circle */    } while (--cycles);}/* structure for gzip file read operations */typedef struct {    int fd;                     /* file descriptor */    int size;                   /* 1 << size is bytes in buf */    unsigned left;              /* bytes available at next */    unsigned char *buf;         /* buffer */    unsigned char *next;        /* next byte in buffer */    char *name;                 /* file name for error messages */} file;/* reload buffer */local int readin(file *in){    int len;    len = read(in->fd, in->buf, 1 << in->size);    if (len == -1) bye("error reading ", in->name);    in->left = (unsigned)len;    in->next = in->buf;    return len;}/* read from file in, exit if end-of-file */local int readmore(file *in){    if (readin(in) == 0) bye("unexpected end of ", in->name);    return 0;}#define read1(in) (in->left == 0 ? readmore(in) : 0, \                   in->left--, *(in->next)++)/* skip over n bytes of in */local void skip(file *in, unsigned n){    unsigned bypass;    if (n > in->left) {        n -= in->left;        bypass = n & ~((1U << in->size) - 1);        if (bypass) {            if (lseek(in->fd, (off_t)bypass, SEEK_CUR) == -1)                bye("seeking ", in->name);            n -= bypass;        }        readmore(in);        if (n > in->left)            bye("unexpected end of ", in->name);    }    in->left -= n;    in->next += n;}/* read a four-byte unsigned integer, little-endian, from in */unsigned long read4(file *in){    unsigned long val;    val = read1(in);    val += (unsigned)read1(in) << 8;    val += (unsigned long)read1(in) << 16;    val += (unsigned long)read1(in) << 24;    return val;}/* skip over gzip header */local void gzheader(file *in){    int flags;    unsigned n;    if (read1(in) != 31 || read1(in) != 139) bye(in->name, " not a gzip file");    if (read1(in) != 8) bye("unknown compression method in", in->name);    flags = read1(in);    if (flags & 0xe0) bye("unknown header flags set in", in->name);    skip(in, 6);    if (flags & 4) {        n = read1(in);        n += (unsigned)(read1(in)) << 8;        skip(in, n);    }    if (flags & 8) while (read1(in) != 0) ;    if (flags & 16) while (read1(in) != 0) ;    if (flags & 2) skip(in, 2);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一级二级 | 国产欧美中文在线| 蜜桃精品视频在线| 欧美一区二区三区视频免费| 亚洲aaa精品| 日韩视频免费观看高清完整版在线观看| 亚洲午夜成aⅴ人片| 欧美另类videos死尸| 亚洲地区一二三色| 制服丝袜成人动漫| 国内精品伊人久久久久影院对白| 亚洲精品在线免费观看视频| 精品一区二区三区久久| 久久久久成人黄色影片| 成人动漫精品一区二区| 一区二区在线看| 91精品婷婷国产综合久久性色 | 日日摸夜夜添夜夜添国产精品 | 日韩av一区二区在线影视| 欧美一级一级性生活免费录像| 日本不卡一区二区| 日韩午夜激情免费电影| 国产成人精品影视| 亚洲欧美区自拍先锋| 欧美日韩电影一区| 国产一区二区精品久久| 亚洲色图视频网站| 日韩一级视频免费观看在线| 狠狠网亚洲精品| 亚洲欧美日韩电影| 精品捆绑美女sm三区| 99久久国产综合精品色伊| 水野朝阳av一区二区三区| 国产日韩精品视频一区| 在线精品视频一区二区| 久久电影网电视剧免费观看| 国产精品久久久爽爽爽麻豆色哟哟| 色一情一乱一乱一91av| 蜜臂av日日欢夜夜爽一区| 中文字幕一区二区三中文字幕| 欧美精品一二三区| 白白色 亚洲乱淫| 丝袜美腿亚洲色图| 亚洲欧洲精品一区二区三区不卡| 欧美一区二区网站| 色综合色狠狠天天综合色| 精品一区二区在线播放| 亚洲最色的网站| 欧美经典三级视频一区二区三区| 欧美日韩一区二区三区在线| 国产成人av网站| 视频一区中文字幕| 日本一二三四高清不卡| 91精品国产综合久久蜜臀| 97久久人人超碰| 国产一区二区三区四区五区美女| 亚洲国产精品尤物yw在线观看| 国产欧美一二三区| 日韩欧美中文字幕公布| 欧美综合亚洲图片综合区| 风间由美一区二区av101| 免费日韩伦理电影| 午夜精品久久久久久久久| 亚洲欧美视频在线观看视频| 国产亚洲欧美在线| 精品国产百合女同互慰| 欧美日韩不卡视频| 成人av网在线| 国产成人免费视频网站高清观看视频| 国产盗摄一区二区| 免费成人你懂的| 日本伊人午夜精品| 手机精品视频在线观看| 亚洲国产色一区| 亚洲一区二区成人在线观看| 亚洲欧美日韩综合aⅴ视频| 欧美激情综合五月色丁香 | 国产激情一区二区三区| 蜜桃久久久久久久| 麻豆精品新av中文字幕| 人人爽香蕉精品| 蜜桃久久精品一区二区| 奇米四色…亚洲| 美国毛片一区二区| 久久国产精品99久久久久久老狼 | 制服丝袜中文字幕亚洲| 欧美日韩一区在线| 欧美精品tushy高清| 欧美日韩国产综合久久| 欧美高清www午色夜在线视频| 欧美精品在线观看播放| 欧美一区二区三区人| 日韩精品综合一本久道在线视频| 欧美一区日本一区韩国一区| 91精品国产一区二区人妖| 日韩一卡二卡三卡四卡| 久久蜜桃香蕉精品一区二区三区| 久久久蜜臀国产一区二区| 中文字幕欧美三区| 亚洲欧美日韩中文字幕一区二区三区| 亚洲欧美日韩国产中文在线| 亚洲一区二区综合| 婷婷丁香激情综合| 国产一区二区三区久久久| 成人精品在线视频观看| 91福利国产成人精品照片| 欧美理论电影在线| 久久综合九色综合97婷婷| 国产精品天美传媒沈樵| 亚洲丝袜美腿综合| 亚洲丶国产丶欧美一区二区三区| 久久综合综合久久综合| hitomi一区二区三区精品| 欧美日免费三级在线| 日韩精品一区二区三区三区免费| 国产精品区一区二区三| 性做久久久久久免费观看| 国产高清不卡二三区| 色婷婷亚洲精品| 日韩写真欧美这视频| 中文字幕一区二区三区不卡| 午夜精品久久久| 成人黄色片在线观看| 欧美剧在线免费观看网站| 日本一区二区高清| 午夜精品久久久久久久99樱桃| 国产盗摄一区二区三区| 欧美精品一二三| 国产精品免费aⅴ片在线观看| 香港成人在线视频| 高清不卡在线观看| 91.xcao| 国产精品欧美精品| 男女男精品视频| 欧美主播一区二区三区| 26uuu国产在线精品一区二区| 亚洲老司机在线| 国产一区二区三区久久悠悠色av| 色婷婷久久久久swag精品| 亚洲桃色在线一区| 国产精品一区二区男女羞羞无遮挡| 在线欧美一区二区| 久久精品一区二区三区不卡牛牛 | 另类欧美日韩国产在线| 成人av免费在线观看| 久久综合九色综合久久久精品综合| 亚洲日本在线a| 丰满少妇在线播放bd日韩电影| 欧美三级韩国三级日本一级| 国产亚洲制服色| 日韩电影在线免费观看| 在线观看日韩毛片| 久久色视频免费观看| 亚洲国产毛片aaaaa无费看| 成人一区二区视频| 精品福利一区二区三区免费视频| 自拍偷自拍亚洲精品播放| 久99久精品视频免费观看| 在线免费观看日本一区| 国产精品国产三级国产有无不卡| 日本91福利区| 欧美视频完全免费看| 中文字幕在线观看一区| 九一九一国产精品| 成人一区二区三区在线观看| 久久久综合网站| 奇米色777欧美一区二区| 在线观看不卡一区| 久久精品夜色噜噜亚洲a∨| 国产精品一区二区三区99| 日韩精品一区二区在线观看| 亚洲福利视频一区| 成人国产电影网| 国产精品毛片久久久久久久| 极品少妇xxxx精品少妇偷拍| 91精品国产色综合久久ai换脸| 久久综合一区二区| 国产不卡视频在线观看| 精品国产乱码久久久久久免费 | 国产乱码精品1区2区3区| 精品奇米国产一区二区三区| 日韩精品视频网站| 日韩欧美在线综合网| 五月综合激情网| 日韩一区二区三免费高清| 一本到不卡精品视频在线观看| 国产精品欧美一级免费| 不卡视频一二三| 亚洲国产成人一区二区三区| av亚洲精华国产精华| 日韩一区二区免费在线观看| 久久丁香综合五月国产三级网站 | 91视频在线观看| 亚洲欧洲中文日韩久久av乱码| 91黄色免费版| 麻豆精品视频在线观看免费| 久久综合狠狠综合久久综合88| 国产精品69毛片高清亚洲| 国产精品久久久99| 色天使久久综合网天天|