verasure - Jerasure made simple in V
This is a V implementation of Jerasure2, with a custom wrapper.
In V, there is a wrapper to make call pure-v style.
Example
module main
import incubaid.herolib.data.verasure
fn main() {
mut e := verasure.new(16, 4)
shards := e.encode("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer consectetur accumsan augue, at pharetra".bytes())
println(shards)
data := e.decode(shards)
println(data.len)
println(data.bytestr())
}
- Create a new Verasure object, with data and parity amount
- Encode any bytes data
- Decode shards to get bytes back
Disclamer
This is still in progress, memory management is not yet there. There is still a bug on parity missing.