go-erasure

Pure-Go erasure coding — Reed-Solomon over GF(216) and the RozoFS Mojette transform, with go-asmgen SIMD.

CGO_ENABLED=0Reed-Solomon GF(2¹⁶)Mojette transform (RozoFS)go-asmgen SIMDreal-hardware validatedBSD-3-Clause
Documentation GitHub

go-erasure is two families of erasure code in dependency-free Go: a Reed-Solomon MDS codec over GF(216) (the PAR2-compatible field) and the XOR-only Mojette discrete-Radon transform used by RozoFS. The region hot loops dispatch to go-asmgen SIMD kernels, each checked byte-for-byte against the scalar oracle and validated on real POWER8, IBM z15, RISC-V and Apple silicon.

Reed-Solomon in a few lines

4 data shards + 2 parity shards: any 4 of the 6 shards recover everything.

enc, _ := reedsolomon.New(4, 2)
enc.Encode(shards)                    // writes the 2 parity shards
enc.Reconstruct(shards, present)      // rebuilds up to 2 missing shards

Repositories

Two independent codecs, mirrored from the live GitHub repos.

reedsolomon codec

Reed-Solomon MDS erasure code over GF(216) (PAR2-compatible field, primitive 0x1100B). SPLIT(16,4) SIMD on all six 64-bit targets.

CI Go Reference

mojette codec

Mojette transform erasure code — XOR-only discrete Radon projections, as used by RozoFS. go-asmgen XOR kernels on all six 64-bit SIMD targets.

CI Go Reference

Both codecs are pure Go with CGO_ENABLED=0. Each ships a scalar reference implementation as its correctness oracle and a go-asmgen SIMD fast path proven bit-identical to it by a differential fuzzer. 100% test coverage, verified across nine GOOS/GOARCH targets. BSD-3-Clause.