decode_rs8(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

hey bestie πŸ’– okay so this is the decode_rs8(9) page from the Kernel API Manual β€” section 9, no cap.

πŸŽ€ NAME πŸŽ€

decode_rs8 β€” Decode codeword (8bit data width). that's the whole vibe: it's the decoder for 8-bit data width. slay.

✨ SYNOPSIS ✨

here's the exact signature, character for character β€” don't let the line wrap gaslight you:

int decode_rs8 (struct rs_control *rsc , uint8_t *data , uint16_t *par ,
int len , uint16_t *s , int no_eras , int *eras_pos , uint16_t invmsk ,
uint16_t *corr );

🌸 ARGUMENTS 🌸

okay bestie, argument-by-argument, let's go:

  • rsc β€” the rs control structure. main character energy.
  • data β€” data field of a given type. yep, that's the field.
  • par β€” received parity data field. the parity bestie.
  • len β€” data length. how long the data is, periodt.
  • s β€” syndrome data field, and it must be in index form. if it's NULL, the syndrome is calculated. iconic convenience.
  • no_eras β€” number of erasures. count 'em.
  • eras_pos β€” position of erasures. can be NULL, so no pressure.
  • invmsk β€” invert data mask. IMPORTANT: it will be xored on data, not on parity! literally not parity, bestie β€” data only. πŸ’…
  • corr β€” buffer to store correction bitmask on eras_pos. that's its whole job.

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: the syndrome and parity uses a uint16_t data type to enable symbol size > 8. highkey useful. The calling code must take care of decoding of the syndrome result and the received parity before calling this code. no cap, that part is on the caller.

πŸ’œ NOTE πŸ’œ

The rs_control struct rsc contains buffers which are used for decoding, so the caller has to ensure that decoder invocations are serialized. like, one at a time, bestie β€” don't let them overlap. 🫢

Returns the number of corrected symbols or -EBADMSG for uncorrectable errors. The count includes errors in the parity. so yes, parity errors are in the count too β€” the way that detail matters. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, iykyk:


this page is brought to you by source ./lib/reed_solomon, dated October 2026, and it's the decode_rs8(9) page in the Kernel API Manual. stay slay, bestie πŸ’…βœ¨

πŸ“¦ where this page comes from