FAILURE MAP
← Case archive

FA-72302 / Error-correcting codes / Member archive

RS framing always adds a codeword · case 02

Payloads that are an exact multiple of k (and empty payloads) get an extra, empty codeword.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Frame a payload of the given number of bytes into shortened RS(n, k) codewords: cw = ceil(payload / k) codewords, the last one carries payload - (cw - 1)*k data bytes (shortened, zero padding not transmitted), and each codeword adds n - k parity bytes. An empty payload uses no codewords. Return [cw, last data bytes, bytes sent]; invalid parameters return None.

Why this case matters

Link layers size FEC frames and transmit budgets from the payload length.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression [223, 255, 223][2, 0, 287][1, 223, 255]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗