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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? gzappend.c

?? 許多壓縮算法都用到了ZLIP算法
?? 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.1'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.1 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);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲图片小说| 日韩精品亚洲一区二区三区免费| 狠狠色丁香久久婷婷综合_中 | 欧美电影一区二区三区| 亚洲综合视频在线观看| 91国产福利在线| 水蜜桃久久夜色精品一区的特点| 在线观看av不卡| 日韩在线a电影| 久久久亚洲高清| 99精品视频在线免费观看| 亚洲欧美一区二区三区孕妇| 欧美亚洲日本一区| 日韩成人av影视| 久久噜噜亚洲综合| 99视频精品免费视频| 亚洲一二三区在线观看| 日韩视频免费观看高清完整版| 狠狠狠色丁香婷婷综合激情 | 国产东北露脸精品视频| 国产精品久久久久久久久动漫 | 国产精品一区二区三区四区| 中文字幕免费不卡| 国产色一区二区| 狠狠色丁香久久婷婷综合_中| 91丨九色丨蝌蚪富婆spa| 亚洲福利视频一区二区| 日韩欧美激情四射| 99久久亚洲一区二区三区青草| 亚洲女同一区二区| 欧美电影免费观看高清完整版| 成人丝袜高跟foot| 日本特黄久久久高潮| 国产精品久线在线观看| 欧美一区二区三区系列电影| 成人福利视频网站| 免费看日韩精品| 最新中文字幕一区二区三区| 欧美一二三区精品| 91丨国产丨九色丨pron| 另类小说图片综合网| 亚洲精品免费播放| 久久久久久久免费视频了| 激情六月婷婷综合| 亚洲gay无套男同| 国产精品日韩成人| 精品日韩一区二区三区| 欧美性大战久久久久久久| 大陆成人av片| 激情综合网天天干| 手机精品视频在线观看| 亚洲丝袜制服诱惑| 国产欧美综合色| 日韩欧美电影在线| 91精品国产综合久久精品图片 | 性欧美疯狂xxxxbbbb| 国产精品天美传媒| 2023国产精品自拍| 91精品国产一区二区三区| 欧美综合久久久| 91免费视频网址| 成人免费av资源| 国产成人av电影免费在线观看| 麻豆91精品91久久久的内涵| 亚洲观看高清完整版在线观看| 成人欧美一区二区三区1314| 国产清纯白嫩初高生在线观看91 | 亚洲另类在线一区| 国产精品理伦片| 亚洲激情一二三区| 亚洲欧美日韩中文播放| 国产精品美女久久久久久| 久久精品视频在线免费观看| 久久色视频免费观看| 久久综合久久综合亚洲| 精品久久久久久久久久久久包黑料| 欧美日韩一区二区三区不卡| 91老师国产黑色丝袜在线| 99精品热视频| 色狠狠桃花综合| 欧美婷婷六月丁香综合色| 欧美亚洲动漫另类| 欧美日韩一区久久| 日韩一级黄色大片| 久久亚洲精精品中文字幕早川悠里| 日韩欧美黄色影院| 国产午夜精品一区二区三区嫩草 | 国产视频一区在线播放| 亚洲国产成人自拍| 亚洲欧美区自拍先锋| 一卡二卡欧美日韩| 三级成人在线视频| 久久福利资源站| 国产在线精品一区在线观看麻豆| 国产剧情av麻豆香蕉精品| 国产91精品久久久久久久网曝门| 成人影视亚洲图片在线| 色偷偷一区二区三区| 欧美亚洲愉拍一区二区| 欧美一个色资源| 国产视频一区在线播放| 亚洲男人天堂av| 日韩vs国产vs欧美| 国产不卡一区视频| 日本精品一区二区三区高清| 欧美三级视频在线| 亚洲精品一线二线三线无人区| 国产精品久久久久久久久久免费看| 一区二区免费看| 久久91精品久久久久久秒播| 不卡的av电影| 欧美日本一区二区三区四区| 精品国产乱码久久久久久蜜臀| 欧美国产禁国产网站cc| 亚洲不卡一区二区三区| 国产一区二区在线视频| 色欧美日韩亚洲| 欧美成va人片在线观看| 亚洲青青青在线视频| 久久精品国产秦先生| 91欧美一区二区| 欧美mv和日韩mv国产网站| 亚洲三级免费观看| 精品综合久久久久久8888| 色综合一个色综合亚洲| 精品成人一区二区三区| 亚洲一区二区精品视频| 国产福利91精品一区| 91精品国产综合久久久蜜臀粉嫩| 国产亚洲午夜高清国产拍精品| 亚洲综合色视频| 成人国产精品免费| 中文字幕在线视频一区| 毛片不卡一区二区| 色美美综合视频| 国产欧美一区二区在线观看| 天堂在线一区二区| 91在线高清观看| 国产日产欧美一区| 免费观看30秒视频久久| 欧美在线小视频| 国产精品不卡一区| 国产成人午夜视频| 日韩午夜精品电影| 午夜精品福利一区二区三区av| 成人av第一页| 久久精品在线免费观看| 美女脱光内衣内裤视频久久网站 | 风流少妇一区二区| 日韩精品中文字幕一区| 亚洲国产成人av| 91国产精品成人| 1区2区3区欧美| 岛国一区二区三区| 久久久久久亚洲综合影院红桃| 日韩制服丝袜av| 欧美色综合天天久久综合精品| 中文字幕亚洲一区二区av在线| 国产乱子轮精品视频| 精品少妇一区二区三区| 麻豆视频一区二区| 欧美第一区第二区| 精品综合久久久久久8888| 欧美一区二区三区不卡| 日韩精品一级二级| 91精品国产综合久久香蕉的特点 | 亚洲欧美在线视频| 成人高清免费观看| 中文字幕一区三区| 91在线视频网址| 亚洲精品日韩专区silk| 91浏览器打开| 亚洲成人动漫在线观看| 欧美日韩不卡一区| 日本欧美一区二区三区| 91精品国产一区二区| 美国三级日本三级久久99| 日韩三级中文字幕| 国内外成人在线| 中文字幕av资源一区| av成人老司机| 亚洲国产精品影院| 8x福利精品第一导航| 免费人成在线不卡| 欧美精品一区二区久久久| 国产精品69毛片高清亚洲| 中文一区在线播放| 色婷婷综合久久久| 亚洲电影一区二区三区| 日韩三级视频在线看| 成人综合婷婷国产精品久久蜜臀 | 国产自产v一区二区三区c| 国产欧美一区二区精品秋霞影院| 成人av在线资源网| 亚洲最色的网站| 欧美电视剧免费全集观看 | av毛片久久久久**hd| 一区二区三区鲁丝不卡| 欧美一区在线视频| 成人av免费网站|