亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
色丁香久综合在线久综合在线观看| 香蕉久久夜色精品国产使用方法 | 免费成人av在线播放| 亚洲精品美国一| 中文字幕一区二| 中文字幕一区二区三区在线观看| 国产偷国产偷亚洲高清人白洁| 日韩一区二区在线观看| 欧美日韩在线观看一区二区| 在线免费av一区| 在线欧美小视频| 欧美性猛交xxxxxx富婆| 欧美性大战久久久| 欧美日韩中文一区| 日韩一区二区三区三四区视频在线观看| 在线视频中文字幕一区二区| 欧美视频日韩视频| 91精品蜜臀在线一区尤物| 日韩情涩欧美日韩视频| 精品盗摄一区二区三区| 久久影院视频免费| 中文字幕乱码日本亚洲一区二区| 国产精品丝袜一区| 夜夜嗨av一区二区三区中文字幕 | 精品一区二区影视| 国产精品综合av一区二区国产馆| 国产成人av资源| 91久久精品一区二区三| 在线播放欧美女士性生活| 精品88久久久久88久久久| 欧美国产精品中文字幕| 一区二区三区视频在线看| 青青草91视频| 懂色av中文一区二区三区| 欧美性xxxxx极品少妇| 日韩女同互慰一区二区| 中文字幕av资源一区| 午夜视黄欧洲亚洲| 成人午夜精品一区二区三区| 欧美性猛片aaaaaaa做受| 日韩视频在线永久播放| 亚洲免费在线观看| 久久国产尿小便嘘嘘尿| 一本到三区不卡视频| 日韩精品一区二区三区中文精品| 国产精品午夜在线| 美女爽到高潮91| 91蝌蚪porny九色| 欧美va亚洲va在线观看蝴蝶网| 亚洲欧洲日韩一区二区三区| 老司机免费视频一区二区| 91免费看`日韩一区二区| 精品少妇一区二区三区日产乱码| 亚洲视频一二区| 国产米奇在线777精品观看| 欧美日韩一本到| 亚洲免费在线观看视频| 国产丶欧美丶日本不卡视频| 欧美顶级少妇做爰| 亚洲日本va在线观看| 免费观看一级特黄欧美大片| 91小视频在线免费看| 国产日韩欧美亚洲| 美女视频黄免费的久久| 欧美日韩一级黄| 一区二区三区欧美| www.亚洲激情.com| 国产视频一区二区在线| 久久99精品久久只有精品| 精品视频1区2区| 亚洲免费观看高清| 日本精品视频一区二区三区| 中文字幕av一区 二区| 国产精品一区二区男女羞羞无遮挡 | 久久免费偷拍视频| 老司机午夜精品| 91精品国产手机| 视频在线观看一区二区三区| 欧美日韩中文字幕一区二区| 亚洲一区二区三区四区五区中文| 99久久精品免费看国产免费软件| 国产免费成人在线视频| 懂色一区二区三区免费观看| 欧美高清在线视频| 国产精品99久久久久久久vr| 精品国产一区二区国模嫣然| 激情成人综合网| 国产欧美日韩在线| av在线一区二区三区| 中文字幕日韩av资源站| 色94色欧美sute亚洲13| 亚洲成人一区在线| 日韩欧美国产wwwww| 国产露脸91国语对白| 欧美国产日韩亚洲一区| av一区二区久久| 亚洲一卡二卡三卡四卡无卡久久| 欧美三级中文字| 欧美aaaaaa午夜精品| 国产日韩欧美激情| 91蝌蚪porny九色| 日韩精品五月天| 久久久久久久久久久99999| 国产白丝精品91爽爽久久| 亚洲日本中文字幕区| 7777精品伊人久久久大香线蕉经典版下载 | 国产99一区视频免费| 国产精品第一页第二页第三页| 91网站最新地址| 午夜视频在线观看一区| 久久色中文字幕| 99精品欧美一区二区三区小说| 亚洲一二三四久久| www精品美女久久久tv| 成人av网站大全| 蜜臀久久久99精品久久久久久| 欧美国产日产图区| 欧美一卡2卡3卡4卡| 99久久精品99国产精品| 麻豆精品国产传媒mv男同| 一区在线播放视频| 日韩精品一区二区三区视频| 色偷偷88欧美精品久久久| 国产伦精品一区二区三区视频青涩| 亚洲男同性恋视频| 日本一区二区高清| 欧美一级日韩免费不卡| 在线免费观看日本欧美| 粉嫩在线一区二区三区视频| 另类调教123区| 日精品一区二区| 一区二区三区**美女毛片| 国产精品入口麻豆九色| 欧美不卡123| 欧美一区二区精品在线| 欧洲国内综合视频| 一本色道a无线码一区v| av亚洲精华国产精华精华 | 床上的激情91.| 久久精品国产99| 日本欧美一区二区三区乱码| 亚洲国产日产av| 亚洲高清视频在线| 亚洲综合激情另类小说区| 国产精品欧美久久久久无广告| 久久久久综合网| 久久久久久久精| 久久夜色精品国产噜噜av| 欧美大片国产精品| 欧美成人猛片aaaaaaa| 在线成人av网站| 日韩欧美在线一区二区三区| 9191成人精品久久| 911精品国产一区二区在线| 欧美欧美欧美欧美首页| 在线综合+亚洲+欧美中文字幕| 在线播放亚洲一区| 日韩亚洲欧美中文三级| 精品成人一区二区| 欧美国产一区二区| 久久久不卡网国产精品二区| 欧美经典一区二区三区| 中文字幕免费在线观看视频一区| 中文字幕精品一区二区三区精品| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 日本美女视频一区二区| 日本视频在线一区| 国产在线国偷精品免费看| 国产麻豆精品theporn| k8久久久一区二区三区| 色噜噜夜夜夜综合网| 欧美日韩国产在线播放网站| 日韩一区二区三区四区 | av在线播放成人| 欧美综合亚洲图片综合区| 正在播放亚洲一区| 国产日韩欧美精品电影三级在线| 亚洲国产精品精华液2区45| 国产精品久久久久久久久免费桃花 | 中文字幕av资源一区| 国产精品美女久久久久久久| 国产精品久久久久三级| 午夜在线成人av| 国产电影一区二区三区| 日本精品一区二区三区高清| 69堂成人精品免费视频| 欧美极品少妇xxxxⅹ高跟鞋| 日韩美女久久久| 麻豆视频一区二区| 成人高清在线视频| 在线综合亚洲欧美在线视频| 国产日本欧美一区二区| 亚洲午夜久久久久久久久电影院| 久草在线在线精品观看| 91在线观看污| 26uuu精品一区二区| 亚洲主播在线播放| 国产a视频精品免费观看| 欧美精品少妇一区二区三区| 国产精品色一区二区三区|