Registry / crypto / vivint-infectious

vivint-infectious

JSON →
library0.0.0-20200605153912-25a574ae18a3gogounverified

Implements Reed-Solomon forward error correction using the Berlekamp-Welch algorithm, allowing correction of errors in data.

go get github.com/vivint/infectious
INSTALL
IMPORT
SIG · VIVINT-INFECTIOUS
V
vivint-infectious
cryptogov0.0.0-20200605153912-25a574ae18a3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

infectious
github.com/vivint/infectious

Encode data with Reed-Solomon and recover from missing shares.

package main import ( "fmt" "github.com/vivint/infectious" ) func main() { fec, _ := infectious.NewFEC(10, 5) // 10 data, 5 parity data := []byte("hello world") shares, _ := fec.Encode(data) // Simulate loss of some shares recovered, _ := fec.Decode(nil, shares[:10]) fmt.Println(string(recovered)) }
Debug
Known issues
gotchaThe API has sharp edges regarding memory management; improper use can lead to data races or corruption.
fix
Read the documentation carefully and ensure proper memory lifecycle handling.
affects: all
Upgrade
Version history
0.0.0-20200605153912-25a574ae18a3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
16
Amazon
1
Resources
vivint-infectious — go get vivint-infectious · libregistry