crc4(9)
π NAME β crc4(9) π
Okay so this is crc4(9) from the Kernel API Manual, and it literally calculates the 4-bit crc of a value. Slay. π
β¨
πΈ SYNOPSIS πΈ
uint8_t crc4 (uint8_t c , uint64_t x , int bits );
π ARGUMENTS π
cβ the startingcrc4πxβ the value to checksum β¨bitsβ the number of bits inxto checksum π’
π¦ DESCRIPTION π¦
Returns the crc4 value of x, using polynomial 0b10111 β no cap, that's the polynomial π«Ά.
The x value is treated as left-aligned, and bits above bits are ignored in the crc calculations. So any extra bits hanging out up there? Not invited to the crc party ππ
π₯ SEE ALSO π₯
- Kernel file
./lib/crc/crc4.cπ
And that's the whole vibe check, bestie! This page comes from ./lib/crc, dated October 2026 β mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms