crc32_be(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« crc32_be(9) β€” the Kernel API Manual bestie era πŸ’«

okay so this is Kernel API Manual and today's main character is crc32_be, the function that computes the most-significant-bit-first IEEE CRC-32. yes bestie, we're doing CRC math and we're gonna slay it πŸ’…βœ¨


🌸 NAME 🌸

crc32_be β€” Compute most-significant-bit-first IEEE CRC-32. that's the whole vibe. no cap. πŸ¦‹


✨ SYNOPSIS ✨

u32 crc32_be (u32 crc , const void *p , size_t len );

look at her. iconic signature. take a lil moment 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • crc β€” the initial CRC value, bestie. use ~0 (highkey recommended πŸ’–) or 0 if you're starting a brand new CRC computation, or pass the previous CRC value if you're computing incrementally. she keeps the receipts.
  • p β€” pointer to the data buffer. the actual data goes here, okay? πŸ“
  • len β€” length of data in bytes. how much of the buffer we're feasting on.

πŸ¦‹ DESCRIPTION πŸ¦‹

so crc32_be is literally the same as crc32_le, except crc32_be computes the most-significant-bit-first variant of the CRC. iykyk. πŸ”₯

meaning: within each byte, the most significant bit is processed first (treated as highest order polynomial coefficient). and the same bit order is also used for the CRC value itself. consistency queen πŸ‘‘

here's the tea:

  • Polynomial: 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
  • Bit order: Most-significant-bit-first
  • Polynomial in integer form: 0x04c11db7

not me getting emotional over a polynomial πŸ˜­πŸ’œ


🌈 CONTEXT 🌈

Any context. anywhere. any time. she's flexible like that πŸ’…


⭐ RETURN ⭐

The new CRC value. that's the whole gift. take it and go bestie 🎁✨


πŸ’œ SEE ALSO πŸ’œ

go read those too, they're giving sisterhood 🫢🌸


fr fr: keep the bits in order, keep the polynomial intact, and don't come for crc32_be unless you're ready for most-significant-bit-first energy. periodt. πŸ’€πŸ‘‘

and that's the page, bestie β€” brought to you by Kernel API Manual, sourced from ./include/linux, dated October 2026. mwah πŸ’‹πŸŽ€πŸŒ·

πŸ“¦ where this page comes from