~daniel-mehrmann/e2fsprogs/master

« back to all changes in this revision

Viewing changes to lib/ext2fs/crc32c_defs.h

  • Committer: Daniel Mehrmann
  • Date: 2014-12-16 09:16:59 UTC
  • mfrom: (1.2.25)
  • Revision ID: daniel.mehrmann@gmx.de-20141216091659-ymhbl4ualba43vuc
Tags: 1.43-SN-2014-12-16-0ubuntu1
* Merge in snapshot from the maint branch 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
 
2
 * There are multiple 16-bit CRC polynomials in common use, but this is
 
3
 * *the* standard CRC-32 polynomial, first popularized by Ethernet.
 
4
 * 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+x^0
 
5
 */
 
6
#define CRCPOLY_LE 0xedb88320
 
7
#define CRCPOLY_BE 0x04c11db7
 
8
 
 
9
/*
2
10
 * This is the CRC32c polynomial, as outlined by Castagnoli.
3
11
 * x^32+x^28+x^27+x^26+x^25+x^23+x^22+x^20+x^19+x^18+x^14+x^13+x^11+x^10+x^9+
4
12
 * x^8+x^6+x^0
5
13
 */
6
 
#define CRCPOLY_LE 0x82F63B78
7
 
#define CRCPOLY_BE 0x1EDC6F41
 
14
#define CRC32C_POLY_LE 0x82F63B78
 
15
#define CRC32C_POLY_BE 0x1EDC6F41
8
16
 
9
17
/* How many bits at a time to use.  Valid values are 1, 2, 4, 8, 32 and 64. */
10
18
/* For less performance-sensitive, use 4 */