how to calculate CRC value for a file in C#.net?
问题 i want to calculate the CRC value for a file using 32-bit algorithm in C#.net.... 回答1: Algorithm is straightforward (rewritten from c++) class Crc32 { public static uint CountCrc(byte[] pBuf) { // Table of CRC-32's of all single byte values uint[] crctab = new uint[] { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148,