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

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

?? gzio.c

?? ocx 代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
       if (s->mode == 'w') {
           err = deflateEnd(&(s->stream));
       } else if (s->mode == 'r') {
           err = inflateEnd(&(s->stream));
       }
    }
    if (s->file != NULL && fclose(s->file)) {
        err = Z_ERRNO;
    }
    if (s->z_err < 0) err = s->z_err;

    TRYFREE(s->inbuf);
    TRYFREE(s->outbuf);
    TRYFREE(s->path);
    TRYFREE(s);
    return err;
}

/* ===========================================================================
     Reads the given number of uncompressed bytes from the compressed file.
   gzread returns the number of bytes actually read (0 for end of file).
*/
int EXPORT gzread (file, buf, len)
    gzFile file;
    voidp buf;
    unsigned len;
{
    gz_stream *s = (gz_stream*)file;
    Bytef *start = buf; /* starting point for crc computation */
    Byte  *next_out; /* == stream.next_out but not forced far (for MSDOS) */

    if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;

    if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;
    if (s->z_err == Z_STREAM_END) return 0;  /* EOF */

    s->stream.next_out = next_out = buf;
    s->stream.avail_out = len;

    while (s->stream.avail_out != 0) {

	if (s->transparent) {
	    /* Copy first the lookahead bytes: */
	    uInt n = s->stream.avail_in;
	    if (n > s->stream.avail_out) n = s->stream.avail_out;
	    if (n > 0) {
		zmemcpy(s->stream.next_out, s->stream.next_in, n);
		next_out += n;
		s->stream.next_out = next_out;
		s->stream.next_in   += n;
		s->stream.avail_out -= n;
		s->stream.avail_in  -= n;
	    }
	    if (s->stream.avail_out > 0) {
		s->stream.avail_out -= fread(next_out, 1, s->stream.avail_out,
					     s->file);
	    }
	    return (int)(len - s->stream.avail_out);
	}
        if (s->stream.avail_in == 0 && !s->z_eof) {

            errno = 0;
            s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file);
            if (s->stream.avail_in == 0) {
                s->z_eof = 1;
		if (ferror(s->file)) {
		    s->z_err = Z_ERRNO;
		    break;
		}
            }
            s->stream.next_in = s->inbuf;
        }
        s->z_err = inflate(&(s->stream), Z_NO_FLUSH);

	if (s->z_err == Z_STREAM_END) {
	    /* Check CRC and original size */
	    s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
	    start = s->stream.next_out;

	    if (getLong(s) != s->crc || getLong(s) != s->stream.total_out) {
		s->z_err = Z_DATA_ERROR;
	    } else {
		/* Check for concatenated .gz files: */
		check_header(s);
		if (s->z_err == Z_OK) {
		    inflateReset(&(s->stream));
		    s->crc = crc32(0L, Z_NULL, 0);
		}
	    }
	}
	if (s->z_err != Z_OK || s->z_eof) break;
    }
    s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));

    return (int)(len - s->stream.avail_out);
}

/* ===========================================================================
     Writes the given number of uncompressed bytes into the compressed file.
   gzwrite returns the number of bytes actually written (0 in case of error).
*/
int EXPORT gzwrite (file, buf, len)
    gzFile file;
    const voidp buf;
    unsigned len;
{
    gz_stream *s = (gz_stream*)file;

    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;

    s->stream.next_in = buf;
    s->stream.avail_in = len;

    while (s->stream.avail_in != 0) {

        if (s->stream.avail_out == 0) {

            s->stream.next_out = s->outbuf;
            if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
                s->z_err = Z_ERRNO;
                break;
            }
            s->stream.avail_out = Z_BUFSIZE;
        }
        s->z_err = deflate(&(s->stream), Z_NO_FLUSH);
        if (s->z_err != Z_OK) break;
    }
    s->crc = crc32(s->crc, buf, len);

    return (int)(len - s->stream.avail_in);
}

/* ===========================================================================
     Flushes all pending output into the compressed file. The parameter
   flush is as in the deflate() function.
     gzflush should be called only when strictly necessary because it can
   degrade compression.
*/
int EXPORT gzflush (file, flush)
    gzFile file;
    int flush;
{
    uInt len;
    int done = 0;
    gz_stream *s = (gz_stream*)file;

    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;

    s->stream.avail_in = 0; /* should be zero already anyway */

    for (;;) {
        len = Z_BUFSIZE - s->stream.avail_out;

        if (len != 0) {
            if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {
                s->z_err = Z_ERRNO;
                return Z_ERRNO;
            }
            s->stream.next_out = s->outbuf;
            s->stream.avail_out = Z_BUFSIZE;
        }
        if (done) break;
        s->z_err = deflate(&(s->stream), flush);

        /* deflate has finished flushing only when it hasn't used up
         * all the available space in the output buffer: 
         */
        done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);
 
        if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break;
    }
    fflush(s->file);
    return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
}

/* ===========================================================================
   Outputs a long in LSB order to the given file
*/
local void putLong (file, x)
    FILE *file;
    uLong x;
{
    int n;
    for (n = 0; n < 4; n++) {
        fputc((int)(x & 0xff), file);
        x >>= 8;
    }
}

/* ===========================================================================
   Reads a long in LSB order from the given gz_stream. Sets 
*/
local uLong getLong (s)
    gz_stream *s;
{
    uLong x = (uLong)get_byte(s);
    int c;

    x += ((uLong)get_byte(s))<<8;
    x += ((uLong)get_byte(s))<<16;
    c = get_byte(s);
    if (c == EOF) s->z_err = Z_DATA_ERROR;
    x += ((uLong)c)<<24;
    return x;
}

/* ===========================================================================
     Flushes all pending output if necessary, closes the compressed file
   and deallocates all the (de)compression state.
*/
int EXPORT gzclose (file)
    gzFile file;
{
    int err;
    gz_stream *s = (gz_stream*)file;

    if (s == NULL) return Z_STREAM_ERROR;

    if (s->mode == 'w') {
        err = gzflush (file, Z_FINISH);
        if (err != Z_OK) return destroy(file);

        putLong (s->file, s->crc);
        putLong (s->file, s->stream.total_in);

    }
    return destroy(file);
}

/* ===========================================================================
     Returns the error message for the last error which occured on the
   given compressed file. errnum is set to zlib error number. If an
   error occured in the file system and not in the compression library,
   errnum is set to Z_ERRNO and the application may consult errno
   to get the exact error code.
*/
const char*  EXPORT gzerror (file, errnum)
    gzFile file;
    int *errnum;
{
    char *m;
    gz_stream *s = (gz_stream*)file;

    if (s == NULL) {
        *errnum = Z_STREAM_ERROR;
        return (const char*)ERR_MSG(Z_STREAM_ERROR);
    }
    *errnum = s->z_err;
    if (*errnum == Z_OK) return (const char*)"";

    m =  (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);

    if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err);

    TRYFREE(s->msg);
    s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3);
    strcpy(s->msg, s->path);
    strcat(s->msg, ": ");
    strcat(s->msg, m);
    return (const char*)s->msg;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美影院精品一区| 欧美视频在线一区二区三区 | 精品写真视频在线观看| 91原创在线视频| 久久一区二区三区国产精品| 天堂成人免费av电影一区| av一区二区三区黑人| 久久免费电影网| 免费在线视频一区| 在线看国产一区| 国产精品福利影院| 国产传媒日韩欧美成人| 欧美一级搡bbbb搡bbbb| 亚洲电影你懂得| 色婷婷综合在线| 国产精品国产三级国产普通话99| 国内不卡的二区三区中文字幕| 欧美人伦禁忌dvd放荡欲情| 亚洲精品第1页| 色综合久久久网| 国产精品久久久久久久久久久免费看| 国产做a爰片久久毛片| 欧美一区二区性放荡片| 日韩电影在线观看网站| 精品视频色一区| 亚洲成a人片在线不卡一二三区 | 国产乱码精品一区二区三区五月婷 | 99视频一区二区| 欧美国产日韩在线观看| 国产91精品露脸国语对白| 久久久欧美精品sm网站| 国产一区二区女| 精品国内片67194| 美日韩一级片在线观看| 91麻豆精品国产91久久久资源速度| 亚洲影院理伦片| 欧美视频中文字幕| 亚洲bt欧美bt精品| 69p69国产精品| 欧美96一区二区免费视频| 欧美日本免费一区二区三区| 午夜精品福利在线| 欧美一区二区久久| 久久国产综合精品| 2017欧美狠狠色| 国产精品一二三区| 亚洲欧洲日本在线| 色94色欧美sute亚洲13| 夜夜亚洲天天久久| 欧美日韩一区二区在线观看视频| 天天综合网 天天综合色| 欧美一区二区三区啪啪| 九一久久久久久| 国产欧美日韩视频一区二区| 成人小视频免费在线观看| 国产精品福利一区二区三区| 色哟哟精品一区| 亚洲国产日韩精品| 日韩你懂的在线观看| 国产一区二三区| 国产精品卡一卡二| 欧美亚洲综合色| 久久国产精品99久久人人澡| 久久这里只有精品6| 北条麻妃一区二区三区| 一区二区三区.www| 91精品国模一区二区三区| 久久99这里只有精品| 国产精品女同一区二区三区| 一本一本久久a久久精品综合麻豆| 午夜亚洲福利老司机| 欧美mv和日韩mv的网站| 成人教育av在线| 亚洲成在线观看| 久久久亚洲高清| 91在线观看下载| 日韩一区精品字幕| 久久九九久久九九| 日本高清无吗v一区| 麻豆视频一区二区| 国产精品久99| 日韩一区二区三区在线视频| 成人国产免费视频| 日韩国产精品久久久久久亚洲| 久久久久久99精品| 欧美日韩一区国产| 国产精品色哟哟| 免费看黄色91| 国产精品对白交换视频 | 精东粉嫩av免费一区二区三区| 国产精品久久久久永久免费观看 | 91在线国产福利| 美脚の诱脚舐め脚责91| 成人欧美一区二区三区1314 | 欧美综合色免费| 国产在线精品一区二区夜色| 一区二区激情视频| 2024国产精品| 欧美日韩国产欧美日美国产精品| 国产成人精品网址| 视频一区视频二区在线观看| 国产精品久久午夜夜伦鲁鲁| 日韩欧美中文一区| 色狠狠综合天天综合综合| 国产一区二区三区观看| 亚洲成人在线网站| 成人免费一区二区三区视频| 日韩欧美一区二区三区在线| 91福利精品视频| 豆国产96在线|亚洲| 美女视频免费一区| 亚洲一区影音先锋| 国产精品乱人伦一区二区| 精品免费一区二区三区| 欧美日韩精品欧美日韩精品一 | 精品一区二区在线看| 亚洲精品乱码久久久久久黑人| 国产亚洲欧美日韩在线一区| 51午夜精品国产| 欧美午夜精品免费| a亚洲天堂av| 国产91精品入口| 狠狠色综合日日| 日韩 欧美一区二区三区| 亚洲影视在线播放| 综合亚洲深深色噜噜狠狠网站| 国产亚洲欧美一区在线观看| 日韩午夜激情免费电影| 欧美日韩在线播放三区| 色94色欧美sute亚洲线路一ni| av亚洲精华国产精华| 国产成人av影院| 国产一区高清在线| 国内精品国产成人国产三级粉色| 日av在线不卡| 亚洲一区二区三区在线看| 亚洲天堂成人在线观看| 中文字幕久久午夜不卡| 国产无一区二区| 久久精品网站免费观看| 日韩欧美在线综合网| 日韩一级大片在线观看| 欧美一区二区二区| 欧美日韩国产系列| 欧美日韩视频在线一区二区| 色噜噜偷拍精品综合在线| 91色九色蝌蚪| 在线一区二区视频| 在线视频欧美精品| 欧美午夜一区二区三区免费大片| 91九色最新地址| 欧美中文字幕不卡| 欧美日韩国产影片| 欧美一区二区三区四区高清| 777a∨成人精品桃花网| 91精品国产一区二区人妖| 欧美一区二区三区精品| 欧美一级搡bbbb搡bbbb| 欧美xxxx老人做受| 久久蜜桃av一区二区天堂| 日韩欧美的一区| 久久久久久夜精品精品免费| 亚洲国产高清在线| 国产精品精品国产色婷婷| 亚洲色图第一区| 亚洲欧美二区三区| 亚洲成a人片在线观看中文| 日韩成人一区二区| 久久综合综合久久综合| 国产成人免费视频网站高清观看视频| 成人午夜精品在线| 91麻豆精品在线观看| 欧美视频一区二区三区在线观看| 69堂国产成人免费视频| 精品国产伦一区二区三区观看方式| 久久久久88色偷偷免费| 日韩毛片视频在线看| 亚洲高清不卡在线| 麻豆成人久久精品二区三区红 | 日本视频中文字幕一区二区三区| 久久精品国产精品青草| 国产成人在线观看免费网站| 成人av资源在线观看| 在线亚洲+欧美+日本专区| 欧美精品国产精品| 久久影院午夜片一区| 中文字幕在线观看不卡视频| 亚洲一区二区3| 久久9热精品视频| 99视频有精品| 91精品视频网| 欧美国产在线观看| 亚洲综合偷拍欧美一区色| 美国欧美日韩国产在线播放 | 日韩精品1区2区3区| 国产一区二区在线影院| 91碰在线视频| 日韩免费看网站| 亚洲日本电影在线| 奇米精品一区二区三区四区 |