# Erasure-Coding Playground > Reed–Solomon over GF(256): encode data into k + m shards, lose some, rebuild it. Splits your text or bytes into k data shards, adds m Reed–Solomon parity shards computed over GF(256), lets you drop any shards and reconstructs the original from any k survivors. Shows the generator and decoding matrices, the shard bytes in hex, and compares storage overhead and fault tolerance with replication and RAID-5 style XOR parity. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://erasurecodingplayground.usefulweb.site/ (interactive tool at https://erasurecodingplayground.usefulweb.site/tool) - JSON API: POST https://erasurecodingplayground.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://erasurecodingplayground.usefulweb.site/api/v1/tool) - OpenAPI: https://erasurecodingplayground.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://erasurecodingplayground.usefulweb.site/mcp - tool `erasure_coding_playground` ## Inputs - data (textarea, required): Data - Up to 4,096 bytes. Text is encoded as UTF-8. - encoding (select): Data is - k (integer): Data shards (k) - m (integer): Parity shards (m) - lost (text): Lost shards - Shards to delete before reconstruction: D1…Dk (data), P1…Pm (parity) or numbers 1…k+m. Leave empty to only encode. ## Method - Arithmetic is in the finite field GF(2^8) with the primitive polynomial x^8 + x^4 + x^3 + x^2 + 1 (0x11d): addition is XOR, multiplication uses log/antilog tables of the generator 2. - The data is split into k equal shards (zero-padded at the end). The n × k generator matrix is the k × k identity (so data shards are stored as is: a systematic code) on top of an m × k Cauchy matrix C[i][j] = 1 / (x_i + y_j) with x_i = k + i and y_j = j. - Every k × k submatrix of this generator is invertible, so any k of the n = k + m shards are enough (the code is MDS). Reconstruction inverts the rows of the surviving shards by Gauss–Jordan elimination over GF(256) and multiplies the survivors by that inverse. - RAID-5 style parity is the XOR of all data shards: it survives exactly one lost shard. Replication keeps m + 1 full copies, survives m losses, but costs (m + 1)× storage.