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

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

?? crc32.c

?? 一個(gè)本地database引擎,支持中文T_Sql查詢,兼容DELPHI標(biāo)準(zhǔn)數(shù)據(jù)庫控件
?? C
字號(hào):
/* crc32.c -- compute the CRC-32 of a data stream
 * Copyright (C) 1995-2005 Mark Adler
 * For conditions of distribution and use, see copyright notice in zlib.h
 *
 * Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
 * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing
 * tables for updating the shift register in one step with three exclusive-ors
 * instead of four steps with four exclusive-ors.  This results in about a
 * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
 */

/* @(#) $Id$ */

/*
  Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
  protection on the static variables used to control the first-use generation
  of the crc tables.  Therefore, if you #define DYNAMIC_CRC_TABLE, you should
  first call get_crc_table() to initialize the tables before allowing more than
  one thread to use crc32().
 */

#ifdef MAKECRCH
#  include <stdio.h>
#  ifndef DYNAMIC_CRC_TABLE
#    define DYNAMIC_CRC_TABLE
#  endif /* !DYNAMIC_CRC_TABLE */
#endif /* MAKECRCH */

#include "zutil.h"      /* for STDC and FAR definitions */

#define local static

/* Find a four-byte integer type for crc32_little() and crc32_big(). */
#ifndef NOBYFOUR
#  ifdef STDC           /* need ANSI C limits.h to determine sizes */
#    include <limits.h>
#    define BYFOUR
#    if (UINT_MAX == 0xffffffffUL)
       typedef unsigned int u4;
#    else
#      if (ULONG_MAX == 0xffffffffUL)
         typedef unsigned long u4;
#      else
#        if (USHRT_MAX == 0xffffffffUL)
           typedef unsigned short u4;
#        else
#          undef BYFOUR     /* can't find a four-byte integer type! */
#        endif
#      endif
#    endif
#  endif /* STDC */
#endif /* !NOBYFOUR */

/* Definitions for doing the crc four data bytes at a time. */
#ifdef BYFOUR
#  define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
                (((w)&0xff00)<<8)+(((w)&0xff)<<24))
   local unsigned long crc32_little OF((unsigned long,
                        const unsigned char FAR *, unsigned));
   local unsigned long crc32_big OF((unsigned long,
                        const unsigned char FAR *, unsigned));
#  define TBLS 8
#else
#  define TBLS 1
#endif /* BYFOUR */

/* Local functions for crc concatenation */
local unsigned long gf2_matrix_times OF((unsigned long *mat,
                                         unsigned long vec));
local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));

#ifdef DYNAMIC_CRC_TABLE

local volatile int crc_table_empty = 1;
local unsigned long FAR crc_table[TBLS][256];
local void make_crc_table OF((void));
#ifdef MAKECRCH
   local void write_table OF((FILE *, const unsigned long FAR *));
#endif /* MAKECRCH */
/*
  Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
  x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.

  Polynomials over GF(2) are represented in binary, one bit per coefficient,
  with the lowest powers in the most significant bit.  Then adding polynomials
  is just exclusive-or, and multiplying a polynomial by x is a right shift by
  one.  If we call the above polynomial p, and represent a byte as the
  polynomial q, also with the lowest power in the most significant bit (so the
  byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
  where a mod b means the remainder after dividing a by b.

  This calculation is done using the shift-register method of multiplying and
  taking the remainder.  The register is initialized to zero, and for each
  incoming bit, x^32 is added mod p to the register if the bit is a one (where
  x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
  x (which is shifting right by one and adding x^32 mod p if the bit shifted
  out is a one).  We start with the highest power (least significant bit) of
  q and repeat for all eight bits of q.

  The first table is simply the CRC of all possible eight bit values.  This is
  all the information needed to generate CRCs on data a byte at a time for all
  combinations of CRC register values and incoming bytes.  The remaining tables
  allow for word-at-a-time CRC calculation for both big-endian and little-
  endian machines, where a word is four bytes.
*/
local void make_crc_table()
{
    unsigned long c;
    int n, k;
    unsigned long poly;                 /* polynomial exclusive-or pattern */
    /* terms of polynomial defining this crc (except x^32): */
    static volatile int first = 1;      /* flag to limit concurrent making */
    static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};

    /* See if another task is already doing this (not thread-safe, but better
       than nothing -- significantly reduces duration of vulnerability in
       case the advice about DYNAMIC_CRC_TABLE is ignored) */
    if (first) {
        first = 0;

        /* make exclusive-or pattern from polynomial (0xedb88320UL) */
        poly = 0UL;
        for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
            poly |= 1UL << (31 - p[n]);

        /* generate a crc for every 8-bit value */
        for (n = 0; n < 256; n++) {
            c = (unsigned long)n;
            for (k = 0; k < 8; k++)
                c = c & 1 ? poly ^ (c >> 1) : c >> 1;
            crc_table[0][n] = c;
        }

#ifdef BYFOUR
        /* generate crc for each value followed by one, two, and three zeros,
           and then the byte reversal of those as well as the first table */
        for (n = 0; n < 256; n++) {
            c = crc_table[0][n];
            crc_table[4][n] = REV(c);
            for (k = 1; k < 4; k++) {
                c = crc_table[0][c & 0xff] ^ (c >> 8);
                crc_table[k][n] = c;
                crc_table[k + 4][n] = REV(c);
            }
        }
#endif /* BYFOUR */

        crc_table_empty = 0;
    }
    else {      /* not first */
        /* wait for the other guy to finish (not efficient, but rare) */
        while (crc_table_empty)
            ;
    }

#ifdef MAKECRCH
    /* write out CRC tables to crc32.h */
    {
        FILE *out;

        out = fopen("crc32.h", "w");
        if (out == NULL) return;
        fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
        fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
        fprintf(out, "local const unsigned long FAR ");
        fprintf(out, "crc_table[TBLS][256] =\n{\n  {\n");
        write_table(out, crc_table[0]);
#  ifdef BYFOUR
        fprintf(out, "#ifdef BYFOUR\n");
        for (k = 1; k < 8; k++) {
            fprintf(out, "  },\n  {\n");
            write_table(out, crc_table[k]);
        }
        fprintf(out, "#endif\n");
#  endif /* BYFOUR */
        fprintf(out, "  }\n};\n");
        fclose(out);
    }
#endif /* MAKECRCH */
}

#ifdef MAKECRCH
local void write_table(out, table)
    FILE *out;
    const unsigned long FAR *table;
{
    int n;

    for (n = 0; n < 256; n++)
        fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : "    ", table[n],
                n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
}
#endif /* MAKECRCH */

#else /* !DYNAMIC_CRC_TABLE */
/* ========================================================================
 * Tables of CRC-32s of all single-byte values, made by make_crc_table().
 */
#include "crc32.h"
#endif /* DYNAMIC_CRC_TABLE */

/* =========================================================================
 * This function can be used by asm versions of crc32()
 */
const unsigned long FAR * ZEXPORT get_crc_table()
{
#ifdef DYNAMIC_CRC_TABLE
    if (crc_table_empty)
        make_crc_table();
#endif /* DYNAMIC_CRC_TABLE */
    return (const unsigned long FAR *)crc_table;
}

/* ========================================================================= */
#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1

/* ========================================================================= */
unsigned long ZEXPORT crc32(crc, buf, len)
    unsigned long crc;
    const unsigned char FAR *buf;
    unsigned len;
{
    if (buf == Z_NULL) return 0UL;

#ifdef DYNAMIC_CRC_TABLE
    if (crc_table_empty)
        make_crc_table();
#endif /* DYNAMIC_CRC_TABLE */

#ifdef BYFOUR
    if (sizeof(void *) == sizeof(ptrdiff_t)) {
        u4 endian;

        endian = 1;
        if (*((unsigned char *)(&endian)))
            return crc32_little(crc, buf, len);
        else
            return crc32_big(crc, buf, len);
    }
#endif /* BYFOUR */
    crc = crc ^ 0xffffffffUL;
    while (len >= 8) {
        DO8;
        len -= 8;
    }
    if (len) do {
        DO1;
    } while (--len);
    return crc ^ 0xffffffffUL;
}

#ifdef BYFOUR

/* ========================================================================= */
#define DOLIT4 c ^= *buf4++; \
        c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
            crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4

/* ========================================================================= */
local unsigned long crc32_little(crc, buf, len)
    unsigned long crc;
    const unsigned char FAR *buf;
    unsigned len;
{
    register u4 c;
    register const u4 FAR *buf4;

    c = (u4)crc;
    c = ~c;
    while (len && ((ptrdiff_t)buf & 3)) {
        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
        len--;
    }

    buf4 = (const u4 FAR *)(const void FAR *)buf;
    while (len >= 32) {
        DOLIT32;
        len -= 32;
    }
    while (len >= 4) {
        DOLIT4;
        len -= 4;
    }
    buf = (const unsigned char FAR *)buf4;

    if (len) do {
        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
    } while (--len);
    c = ~c;
    return (unsigned long)c;
}

/* ========================================================================= */
#define DOBIG4 c ^= *++buf4; \
        c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
            crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4

/* ========================================================================= */
local unsigned long crc32_big(crc, buf, len)
    unsigned long crc;
    const unsigned char FAR *buf;
    unsigned len;
{
    register u4 c;
    register const u4 FAR *buf4;

    c = REV((u4)crc);
    c = ~c;
    while (len && ((ptrdiff_t)buf & 3)) {
        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
        len--;
    }

    buf4 = (const u4 FAR *)(const void FAR *)buf;
    buf4--;
    while (len >= 32) {
        DOBIG32;
        len -= 32;
    }
    while (len >= 4) {
        DOBIG4;
        len -= 4;
    }
    buf4++;
    buf = (const unsigned char FAR *)buf4;

    if (len) do {
        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
    } while (--len);
    c = ~c;
    return (unsigned long)(REV(c));
}

#endif /* BYFOUR */

#define GF2_DIM 32      /* dimension of GF(2) vectors (length of CRC) */

/* ========================================================================= */
local unsigned long gf2_matrix_times(mat, vec)
    unsigned long *mat;
    unsigned long vec;
{
    unsigned long sum;

    sum = 0;
    while (vec) {
        if (vec & 1)
            sum ^= *mat;
        vec >>= 1;
        mat++;
    }
    return sum;
}

/* ========================================================================= */
local void gf2_matrix_square(square, mat)
    unsigned long *square;
    unsigned long *mat;
{
    int n;

    for (n = 0; n < GF2_DIM; n++)
        square[n] = gf2_matrix_times(mat, mat[n]);
}

/* ========================================================================= */
uLong ZEXPORT crc32_combine(crc1, crc2, len2)
    uLong crc1;
    uLong crc2;
    z_off_t len2;
{
    int n;
    unsigned long row;
    unsigned long even[GF2_DIM];    /* even-power-of-two zeros operator */
    unsigned long odd[GF2_DIM];     /* odd-power-of-two zeros operator */

    /* degenerate case */
    if (len2 == 0)
        return crc1;

    /* put operator for one zero bit in odd */
    odd[0] = 0xedb88320L;           /* CRC-32 polynomial */
    row = 1;
    for (n = 1; n < GF2_DIM; n++) {
        odd[n] = row;
        row <<= 1;
    }

    /* put operator for two zero bits in even */
    gf2_matrix_square(even, odd);

    /* put operator for four zero bits in odd */
    gf2_matrix_square(odd, even);

    /* apply len2 zeros to crc1 (first square will put the operator for one
       zero byte, eight zero bits, in even) */
    do {
        /* apply zeros operator for this bit of len2 */
        gf2_matrix_square(even, odd);
        if (len2 & 1)
            crc1 = gf2_matrix_times(even, crc1);
        len2 >>= 1;

        /* if no more bits set, then done */
        if (len2 == 0)
            break;

        /* another iteration of the loop with odd and even swapped */
        gf2_matrix_square(odd, even);
        if (len2 & 1)
            crc1 = gf2_matrix_times(odd, crc1);
        len2 >>= 1;

        /* if no more bits set, then done */
    } while (len2 != 0);

    /* return combined crc */
    crc1 ^= crc2;
    return crc1;
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一区在线| 国产精品久久99| 欧美日韩成人一区二区| 91浏览器在线视频| 99免费精品在线观看| 成人免费高清在线| 国产99久久精品| 国产成人福利片| 成人午夜激情影院| 懂色中文一区二区在线播放| 国产一区中文字幕| 国产麻豆精品一区二区| 国产伦精品一区二区三区免费| 老鸭窝一区二区久久精品| 日韩精品91亚洲二区在线观看| 午夜精品福利一区二区三区蜜桃| 亚洲国产中文字幕| 日韩在线一区二区| 韩国成人在线视频| 精品一区二区三区蜜桃| 国产一区不卡在线| av电影天堂一区二区在线| 色视频欧美一区二区三区| 在线观看亚洲专区| 在线不卡的av| 欧美变态tickling挠脚心| 26uuu亚洲综合色欧美| 久久精品亚洲国产奇米99| 欧美激情艳妇裸体舞| 亚洲精选一二三| 亚洲成人先锋电影| 韩国一区二区视频| yourporn久久国产精品| 色综合天天综合色综合av| 欧美日韩五月天| 日韩欧美aaaaaa| 国产精品天干天干在线综合| 亚洲欧美另类小说| 青青草成人在线观看| 精品中文字幕一区二区小辣椒| 成人激情黄色小说| 欧美日韩免费电影| 26uuu国产一区二区三区| 国产精品久久久久久久第一福利 | 欧美国产综合一区二区| 中文字幕日韩av资源站| 亚洲444eee在线观看| 激情综合色播激情啊| 99热精品国产| 日本一区二区高清| 亚洲r级在线视频| 国产成人综合亚洲网站| 色噜噜久久综合| 欧美大片在线观看一区二区| 国产精品欧美极品| 天使萌一区二区三区免费观看| 国产东北露脸精品视频| 欧美亚洲高清一区| 日本一区二区三区高清不卡| 亚洲柠檬福利资源导航| 精品一区免费av| 在线观看不卡视频| 国产亚洲一本大道中文在线| 亚洲视频 欧洲视频| 久久99国产精品久久| 91网站在线观看视频| 精品国产第一区二区三区观看体验 | 日韩欧美电影一二三| 亚洲精品国产无天堂网2021 | 91精品在线观看入口| 亚洲欧洲精品一区二区三区不卡| 青青国产91久久久久久| 日本韩国精品在线| 国产亚洲精品福利| 奇米精品一区二区三区在线观看 | 久久99最新地址| 欧美在线小视频| 亚洲欧洲三级电影| 国产一区高清在线| 69av一区二区三区| 亚洲一区二区欧美日韩| 国产91精品入口| 精品蜜桃在线看| 日韩高清不卡一区二区| 色综合久久中文综合久久牛| 国产日韩欧美精品一区| 麻豆精品国产传媒mv男同| 欧美系列在线观看| 亚洲人快播电影网| 成人av电影在线观看| 国产网红主播福利一区二区| 日韩精品视频网| 欧美亚洲动漫精品| 亚洲一区二区三区四区五区黄| bt7086福利一区国产| 国产婷婷色一区二区三区四区| 蜜桃av噜噜一区二区三区小说| 欧美日高清视频| 一区二区三区免费| 99国产一区二区三精品乱码| 中文字幕精品一区二区精品绿巨人 | 26uuu久久天堂性欧美| 久久国产人妖系列| 欧美成人激情免费网| 日本久久精品电影| 亚洲丝袜精品丝袜在线| yourporn久久国产精品| 中文字幕中文在线不卡住| 成人综合婷婷国产精品久久免费| 久久久综合激的五月天| 美女诱惑一区二区| 亚洲欧洲99久久| 美女任你摸久久| 欧美高清hd18日本| 石原莉奈在线亚洲三区| 欧美午夜精品理论片a级按摩| 亚洲黄色在线视频| 在线观看成人免费视频| 亚洲mv在线观看| 91精品在线免费观看| 精品一区二区三区视频| 久久久久久久久伊人| 成人高清免费观看| 中文字幕一区日韩精品欧美| aaa欧美大片| 亚洲欧美日韩久久精品| 欧美日韩国产电影| 日产国产高清一区二区三区| 日韩欧美国产一区在线观看| 久久草av在线| 久久久久久久久久久久久久久99| 东方欧美亚洲色图在线| 亚洲男人的天堂av| 欧美视频精品在线| 蜜桃久久久久久| 国产欧美一区在线| 91蝌蚪porny九色| 天天色图综合网| 久久新电视剧免费观看| 不卡欧美aaaaa| 亚洲gay无套男同| 精品久久久久一区| www.色综合.com| 亚洲国产裸拍裸体视频在线观看乱了 | 国产老妇另类xxxxx| 国产拍揄自揄精品视频麻豆| www.日本不卡| 亚洲最快最全在线视频| 日韩欧美一级精品久久| 国产一区二区不卡在线| 国产精品成人网| 国产一二精品视频| 一级女性全黄久久生活片免费| 欧美日韩免费在线视频| 久色婷婷小香蕉久久| 欧美电影免费观看高清完整版| av网站免费线看精品| 一区二区久久久久久| 日韩一区二区影院| 国产高清亚洲一区| 午夜av一区二区| 精品美女一区二区三区| eeuss影院一区二区三区| 亚洲桃色在线一区| 精品国产亚洲在线| 91丝袜高跟美女视频| 日韩av中文字幕一区二区三区 | 中文字幕av一区 二区| 欧美丝袜丝交足nylons图片| 国产美女av一区二区三区| 亚洲人快播电影网| 欧美国产综合一区二区| 99精品久久只有精品| 免费观看日韩av| 亚洲欧洲另类国产综合| 欧美一区二区三区爱爱| 国产九色sp调教91| 爽好久久久欧美精品| 国产精品视频观看| 51午夜精品国产| 精品在线你懂的| 亚洲国产精品久久艾草纯爱| 久久综合久久综合亚洲| 欧美日韩一区国产| 激情综合网激情| 亚洲国产人成综合网站| 中文在线一区二区| 欧美一级理论片| 欧美日韩一区在线| 北岛玲一区二区三区四区| 强制捆绑调教一区二区| 亚洲视频免费在线观看| 国产精品成人免费| 天堂久久一区二区三区| 亚洲国产成人私人影院tom| 26uuu色噜噜精品一区| 欧美精品日韩综合在线| 91在线一区二区三区| 激情文学综合丁香| 蜜桃精品视频在线|