文件名称: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
(系统自动生成,下载前可以参看下载内容)
下载文件列表
gadsga.txt
www.dssz.com.txt
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.