tanszek:oktatas:techcomm:checksum
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| tanszek:oktatas:techcomm:checksum [2026/10/19 17:53] – knehez | tanszek:oktatas:techcomm:checksum [2026/10/19 17:55] (current) – knehez | ||
|---|---|---|---|
| Line 79: | Line 79: | ||
| The prime number 65521 is part of the algorithm. In our small examples, the sums remain below this number, so the modulo operation does not change them. | The prime number 65521 is part of the algorithm. In our small examples, the sums remain below this number, so the modulo operation does not change them. | ||
| - | == Example: calculating the checksum == | + | === Example: calculating the checksum |
| Our data is: | Our data is: | ||
| Line 104: | Line 104: | ||
| B occupies the upper 16 bits, and A occupies the lower 16 bits. | B occupies the upper 16 bits, and A occupies the lower 16 bits. | ||
| - | == Detecting a change in order == | + | === Detecting a change in order === |
| Now exchange the first two bytes: | Now exchange the first two bytes: | ||
| Line 126: | Line 126: | ||
| Why? The first byte contributes to A earlier, so its effect is included in B more times than the effect of a later byte. | Why? The first byte contributes to A earlier, so its effect is included in B more times than the effect of a later byte. | ||
| - | === What can a checksum guarantee? === | + | ==== What can a checksum guarantee? |
| Adler-32 is used in the zlib compressed data format. It provides a practical way to detect accidental data corruption. | Adler-32 is used in the zlib compressed data format. It provides a practical way to detect accidental data corruption. | ||
tanszek/oktatas/techcomm/checksum.1792432417.txt.gz · Last modified: by knehez
