diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2019-07-09 08:55:13 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2019-07-09 08:55:13 -0700 |
commit | d71dc66fa8a153fb6e7c626847095d9697a6cf42 (patch) | |
tree | 49d7890f0d0bf9f64a135d0e6221e6867a926e97 /crc32.c | |
parent | 02064366155215162223417b939deebfe563ded0 (diff) | |
download | zlib-d71dc66fa8a153fb6e7c626847095d9697a6cf42.tar.gz zlib-d71dc66fa8a153fb6e7c626847095d9697a6cf42.tar.bz2 zlib-d71dc66fa8a153fb6e7c626847095d9697a6cf42.zip |
Fix error in comment on the polynomial representation of a byte.
Diffstat (limited to 'crc32.c')
-rw-r--r-- | crc32.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -224,7 +224,7 @@ local once_t made = ONCE_INIT; | |||
224 | is just exclusive-or, and multiplying a polynomial by x is a right shift by | 224 | is just exclusive-or, and multiplying a polynomial by x is a right shift by |
225 | one. If we call the above polynomial p, and represent a byte as the | 225 | one. If we call the above polynomial p, and represent a byte as the |
226 | polynomial q, also with the lowest power in the most significant bit (so the | 226 | polynomial q, also with the lowest power in the most significant bit (so the |
227 | byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, | 227 | byte 0xb1 is the polynomial x^7+x^3+x^2+1), then the CRC is (q*x^32) mod p, |
228 | where a mod b means the remainder after dividing a by b. | 228 | where a mod b means the remainder after dividing a by b. |
229 | 229 | ||
230 | This calculation is done using the shift-register method of multiplying and | 230 | This calculation is done using the shift-register method of multiplying and |