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

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

?? zstream.h

?? 一個本地database引擎,支持中文T_Sql查詢,兼容DELPHI標準數據庫控件
?? H
字號:
/*
 *
 * Copyright (c) 1997
 * Christian Michelsen Research AS
 * Advanced Computing
 * Fantoftvegen 38, 5036 BERGEN, Norway
 * http://www.cmr.no
 *
 * Permission to use, copy, modify, distribute and sell this software
 * and its documentation for any purpose is hereby granted without fee,
 * provided that the above copyright notice appear in all copies and
 * that both that copyright notice and this permission notice appear
 * in supporting documentation.  Christian Michelsen Research AS makes no
 * representations about the suitability of this software for any
 * purpose.  It is provided "as is" without express or implied warranty.
 *
 */

#ifndef ZSTREAM__H
#define ZSTREAM__H

/*
 * zstream.h - C++ interface to the 'zlib' general purpose compression library
 * $Id: zstream.h 1.1 1997-06-25 12:00:56+02 tyge Exp tyge $
 */

#include <strstream.h>
#include <string.h>
#include <stdio.h>
#include "zlib.h"

#if defined(_WIN32)
#   include <fcntl.h>
#   include <io.h>
#   define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
#else
#   define SET_BINARY_MODE(file)
#endif

class zstringlen {
public:
    zstringlen(class izstream&);
    zstringlen(class ozstream&, const char*);
    size_t value() const { return val.word; }
private:
    struct Val { unsigned char byte; size_t word; } val;
};

//  ----------------------------- izstream -----------------------------

class izstream
{
    public:
        izstream() : m_fp(0) {}
        izstream(FILE* fp) : m_fp(0) { open(fp); }
        izstream(const char* name) : m_fp(0) { open(name); }
        ~izstream() { close(); }

        /* Opens a gzip (.gz) file for reading.
         * open() can be used to read a file which is not in gzip format;
         * in this case read() will directly read from the file without
         * decompression. errno can be checked to distinguish two error
         * cases (if errno is zero, the zlib error is Z_MEM_ERROR).
         */
        void open(const char* name) {
            if (m_fp) close();
            m_fp = ::gzopen(name, "rb");
        }

        void open(FILE* fp) {
            SET_BINARY_MODE(fp);
            if (m_fp) close();
            m_fp = ::gzdopen(fileno(fp), "rb");
        }

        /* Flushes all pending input if necessary, closes the compressed file
         * and deallocates all the (de)compression state. The return value is
         * the zlib error number (see function error() below).
         */
        int close() {
            int r = ::gzclose(m_fp);
            m_fp = 0; return r;
        }

        /* Binary read the given number of bytes from the compressed file.
         */
        int read(void* buf, size_t len) {
            return ::gzread(m_fp, buf, len);
        }

        /* Returns the error message for the last error which occurred on the
         * given compressed file. errnum is set to zlib error number. If an
         * error occurred 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* error(int* errnum) {
            return ::gzerror(m_fp, errnum);
        }

        gzFile fp() { return m_fp; }

    private:
        gzFile m_fp;
};

/*
 * Binary read the given (array of) object(s) from the compressed file.
 * If the input file was not in gzip format, read() copies the objects number
 * of bytes into the buffer.
 * returns the number of uncompressed bytes actually read
 * (0 for end of file, -1 for error).
 */
template <class T, class Items>
inline int read(izstream& zs, T* x, Items items) {
    return ::gzread(zs.fp(), x, items*sizeof(T));
}

/*
 * Binary input with the '>' operator.
 */
template <class T>
inline izstream& operator>(izstream& zs, T& x) {
    ::gzread(zs.fp(), &x, sizeof(T));
    return zs;
}


inline zstringlen::zstringlen(izstream& zs) {
    zs > val.byte;
    if (val.byte == 255) zs > val.word;
    else val.word = val.byte;
}

/*
 * Read length of string + the string with the '>' operator.
 */
inline izstream& operator>(izstream& zs, char* x) {
    zstringlen len(zs);
    ::gzread(zs.fp(), x, len.value());
    x[len.value()] = '\0';
    return zs;
}

inline char* read_string(izstream& zs) {
    zstringlen len(zs);
    char* x = new char[len.value()+1];
    ::gzread(zs.fp(), x, len.value());
    x[len.value()] = '\0';
    return x;
}

// ----------------------------- ozstream -----------------------------

class ozstream
{
    public:
        ozstream() : m_fp(0), m_os(0) {
        }
        ozstream(FILE* fp, int level = Z_DEFAULT_COMPRESSION)
            : m_fp(0), m_os(0) {
            open(fp, level);
        }
        ozstream(const char* name, int level = Z_DEFAULT_COMPRESSION)
            : m_fp(0), m_os(0) {
            open(name, level);
        }
        ~ozstream() {
            close();
        }

        /* Opens a gzip (.gz) file for writing.
         * The compression level parameter should be in 0..9
         * errno can be checked to distinguish two error cases
         * (if errno is zero, the zlib error is Z_MEM_ERROR).
         */
        void open(const char* name, int level = Z_DEFAULT_COMPRESSION) {
            char mode[4] = "wb\0";
            if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;
            if (m_fp) close();
            m_fp = ::gzopen(name, mode);
        }

        /* open from a FILE pointer.
         */
        void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) {
            SET_BINARY_MODE(fp);
            char mode[4] = "wb\0";
            if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;
            if (m_fp) close();
            m_fp = ::gzdopen(fileno(fp), mode);
        }

        /* Flushes all pending output if necessary, closes the compressed file
         * and deallocates all the (de)compression state. The return value is
         * the zlib error number (see function error() below).
         */
        int close() {
            if (m_os) {
                ::gzwrite(m_fp, m_os->str(), m_os->pcount());
                delete[] m_os->str(); delete m_os; m_os = 0;
            }
            int r = ::gzclose(m_fp); m_fp = 0; return r;
        }

        /* Binary write the given number of bytes into the compressed file.
         */
        int write(const void* buf, size_t len) {
            return ::gzwrite(m_fp, (voidp) buf, len);
        }

        /* Flushes all pending output into the compressed file. The parameter
         * _flush is as in the deflate() function. The return value is the zlib
         * error number (see function gzerror below). flush() returns Z_OK if
         * the flush_ parameter is Z_FINISH and all output could be flushed.
         * flush() should be called only when strictly necessary because it can
         * degrade compression.
         */
        int flush(int _flush) {
            os_flush();
            return ::gzflush(m_fp, _flush);
        }

        /* Returns the error message for the last error which occurred on the
         * given compressed file. errnum is set to zlib error number. If an
         * error occurred 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* error(int* errnum) {
            return ::gzerror(m_fp, errnum);
        }

        gzFile fp() { return m_fp; }

        ostream& os() {
            if (m_os == 0) m_os = new ostrstream;
            return *m_os;
        }

        void os_flush() {
            if (m_os && m_os->pcount()>0) {
                ostrstream* oss = new ostrstream;
                oss->fill(m_os->fill());
                oss->flags(m_os->flags());
                oss->precision(m_os->precision());
                oss->width(m_os->width());
                ::gzwrite(m_fp, m_os->str(), m_os->pcount());
                delete[] m_os->str(); delete m_os; m_os = oss;
            }
        }

    private:
        gzFile m_fp;
        ostrstream* m_os;
};

/*
 * Binary write the given (array of) object(s) into the compressed file.
 * returns the number of uncompressed bytes actually written
 * (0 in case of error).
 */
template <class T, class Items>
inline int write(ozstream& zs, const T* x, Items items) {
    return ::gzwrite(zs.fp(), (voidp) x, items*sizeof(T));
}

/*
 * Binary output with the '<' operator.
 */
template <class T>
inline ozstream& operator<(ozstream& zs, const T& x) {
    ::gzwrite(zs.fp(), (voidp) &x, sizeof(T));
    return zs;
}

inline zstringlen::zstringlen(ozstream& zs, const char* x) {
    val.byte = 255;  val.word = ::strlen(x);
    if (val.word < 255) zs < (val.byte = val.word);
    else zs < val;
}

/*
 * Write length of string + the string with the '<' operator.
 */
inline ozstream& operator<(ozstream& zs, const char* x) {
    zstringlen len(zs, x);
    ::gzwrite(zs.fp(), (voidp) x, len.value());
    return zs;
}

#ifdef _MSC_VER
inline ozstream& operator<(ozstream& zs, char* const& x) {
    return zs < (const char*) x;
}
#endif

/*
 * Ascii write with the << operator;
 */
template <class T>
inline ostream& operator<<(ozstream& zs, const T& x) {
    zs.os_flush();
    return zs.os() << x;
}

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠色丁香久久婷婷综| 婷婷国产在线综合| 日本aⅴ免费视频一区二区三区| 成人动漫精品一区二区| 精品国产欧美一区二区| 一区二区三区不卡在线观看 | 老司机一区二区| 欧美日韩免费高清一区色橹橹| 欧美美女一区二区在线观看| 午夜国产不卡在线观看视频| 久久精品视频在线看| 久久精品国产亚洲a| 亚洲精品国产无套在线观| 在线免费观看日韩欧美| 亚洲精品老司机| 国产亚洲成aⅴ人片在线观看| 欧美一区二区视频观看视频| 免费亚洲电影在线| 亚洲在线观看免费视频| 欧美疯狂做受xxxx富婆| 91蜜桃免费观看视频| 亚洲欧美另类小说| 7777精品伊人久久久大香线蕉超级流畅 | 色先锋久久av资源部| 亚洲一区二区三区国产| 国产精品精品国产色婷婷| 色婷婷综合久久久久中文一区二区 | 亚洲美女视频在线| 中文字幕第一区第二区| 99久久99久久精品免费观看| 亚洲福利一二三区| 精品欧美久久久| 成人黄色综合网站| 国产成人丝袜美腿| 一区二区三区不卡在线观看| 亚洲精品午夜久久久| 国产精品每日更新| 91精品国产综合久久香蕉的特点 | 亚洲资源中文字幕| 亚洲激情av在线| 亚洲精品日韩一| 亚洲综合偷拍欧美一区色| 亚洲精品水蜜桃| 一区二区国产盗摄色噜噜| 一区二区三区欧美日韩| 亚洲一区视频在线| 五月婷婷激情综合| 国产成人aaa| 亚洲妇女屁股眼交7| 亚洲国产精品一区二区久久| 亚洲成a人片在线不卡一二三区| 精品国产乱码久久久久久闺蜜| 精品蜜桃在线看| 久久一留热品黄| 欧美男生操女生| 欧美电影免费观看高清完整版 | 欧美老年两性高潮| 在线成人小视频| 欧美mv和日韩mv的网站| 欧美国产日韩精品免费观看| 亚洲欧美日韩一区| 亚洲国产一区二区视频| 美国三级日本三级久久99| 亚洲三级视频在线观看| 久久众筹精品私拍模特| 国产精品网站在线播放| 亚洲综合在线第一页| 日本亚洲免费观看| 午夜伦欧美伦电影理论片| 久久成人免费电影| 成人av第一页| 91精品久久久久久久91蜜桃| 国产亚洲一区二区三区在线观看| 中文字幕一区二区三区不卡 | 午夜视频一区在线观看| 人人精品人人爱| 成人午夜视频福利| 激情综合网天天干| 韩国女主播成人在线| 99久久精品情趣| 欧美日韩不卡一区| 国产视频一区二区在线| 亚洲一级二级三级在线免费观看| 美国十次了思思久久精品导航| 99精品国产热久久91蜜凸| 欧美群妇大交群中文字幕| 国产人妖乱国产精品人妖| 精品成人免费观看| 亚洲乱码精品一二三四区日韩在线| 奇米888四色在线精品| 成人激情黄色小说| 日韩欧美电影一区| 亚洲综合免费观看高清在线观看| 国产自产v一区二区三区c| 欧美性欧美巨大黑白大战| 欧日韩精品视频| 中文字幕精品一区二区精品绿巨人| 婷婷综合另类小说色区| 波多野结衣中文一区| 国产精品自拍一区| 国产99精品在线观看| 日韩小视频在线观看专区| 精品国产三级a在线观看| 亚洲成人综合在线| 成+人+亚洲+综合天堂| 久久久综合九色合综国产精品| 国产欧美日韩激情| 捆绑调教一区二区三区| 欧美日韩一区二区三区在线| 91精品国产综合久久婷婷香蕉| 亚洲激情成人在线| 91色乱码一区二区三区| 欧美国产一区在线| 国产很黄免费观看久久| 欧美一区二区三区四区五区| 亚洲第一成人在线| 欧洲精品视频在线观看| 国产精品盗摄一区二区三区| 国产精品亚洲成人| 久久久91精品国产一区二区精品| 久久精品国产一区二区三| 91麻豆精品国产91久久久| 午夜久久久影院| 欧美老人xxxx18| 国产激情一区二区三区四区| 久久网这里都是精品| 精品一区二区在线看| 日韩精品在线一区二区| 日韩电影一二三区| 日韩免费观看高清完整版在线观看| 亚洲成人动漫av| 欧美亚一区二区| 亚洲国产精品久久久男人的天堂| 在线观看日韩电影| 一区二区三区四区蜜桃| 欧美性色综合网| 亚洲一区二区成人在线观看| 欧美日韩一区二区三区四区| 亚洲一卡二卡三卡四卡无卡久久 | 国产精品亚洲成人| 国产日韩成人精品| av在线播放成人| 国产精品国产三级国产| 99re热这里只有精品视频| 亚洲欧美日韩中文播放| 欧美亚洲综合网| 午夜电影一区二区| 日韩精品一区在线| 国产福利一区二区三区| 中文字幕一区二区三区四区不卡| 一本大道久久a久久综合婷婷| 一区二区高清免费观看影视大全| 欧美日韩一区二区三区在线| 美女网站一区二区| 久久久久久**毛片大全| 99在线精品一区二区三区| 一区二区高清在线| 日韩欧美国产一区二区在线播放| 国产一区二区视频在线| 欧美私模裸体表演在线观看| 午夜欧美在线一二页| 亚洲精品一区二区三区四区高清 | 久久精品国内一区二区三区| 久久精品男人天堂av| 日本精品裸体写真集在线观看| 日韩精品一区二区三区蜜臀| 国产成人a级片| 亚洲最色的网站| 日韩欧美一二三区| 91麻豆国产精品久久| 日韩电影在线一区二区三区| 国产亚洲美州欧州综合国| 97久久精品人人爽人人爽蜜臀| 香蕉av福利精品导航| 久久综合久久综合亚洲| 91浏览器入口在线观看| 日本不卡的三区四区五区| 国产欧美一区二区在线| 欧美艳星brazzers| 国产精品18久久久久久久网站| 亚洲精品国产视频| 久久伊人中文字幕| 色婷婷av一区二区三区软件| 久久99久国产精品黄毛片色诱| 亚洲人成7777| 日韩美一区二区三区| 日本二三区不卡| 国产在线观看免费一区| 亚洲电影第三页| 国产精品久久一卡二卡| 日韩久久久精品| 91久久久免费一区二区| 国产精品影视在线观看| 石原莉奈一区二区三区在线观看| 欧美亚洲动漫精品| 成人性生交大片免费| 久久国产人妖系列| 亚洲一区二区三区在线播放| 亚洲欧洲一区二区三区| 久久综合九色综合97_久久久|