文件名称:gads
介绍说明--下载内容均来自于网络,请自行研究使用
#include <stdio.h>
unsigned long int crc32_table[256]
unsigned long int ulPolynomial = 0x04c11db7
unsigned long int Reflect(unsigned long int ref, char ch)
{ unsigned long int value(0)
// 交换bit0和bit7,bit1和bit6,类推
for(int i = 1 i < (ch + 1) i++)
{ if(ref & 1)
value |= 1 << (ch - i)
ref >>= 1 }
return value
}
init_crc32_table()
{ unsigned long int crc,temp
// 256个值
for(int i = 0 i <= 0xFF i++)
{ temp=Reflect(i, 8)
crc32_table[i]= temp<< 24
for (int j = 0 j < 8 j++){
unsigned long int t1,t2
unsigned long int flag=crc32_table[i]&0x80000000
t1=(crc32_table[i] << 1)
if(flag==0)
t2=0
else
t2=ulPolynomial
crc32_table[i] =t1^t2 }
crc=crc32_table[i]
crc32_table[i] = Reflect(crc32_table[i], 32)
}
}
-# include
unsigned long int crc32_table[256]
unsigned long int ulPolynomial = 0x04c11db7
unsigned long int Reflect(unsigned long int ref, char ch)
{ unsigned long int value(0)
// 交换bit0和bit7,bit1和bit6,类推
for(int i = 1 i < (ch + 1) i++)
{ if(ref & 1)
value |= 1 << (ch - i)
ref >>= 1 }
return value
}
init_crc32_table()
{ unsigned long int crc,temp
// 256个值
for(int i = 0 i <= 0xFF i++)
{ temp=Reflect(i, 8)
crc32_table[i]= temp<< 24
for (int j = 0 j < 8 j++){
unsigned long int t1,t2
unsigned long int flag=crc32_table[i]&0x80000000
t1=(crc32_table[i] << 1)
if(flag==0)
t2=0
else
t2=ulPolynomial
crc32_table[i] =t1^t2 }
crc=crc32_table[i]
crc32_table[i] = Reflect(crc32_table[i], 32)
}
}
-# include
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 89346511gads.zip.rar 列表 gadsga.txt