local-reconstruction-code-gen

Crates.iolocal-reconstruction-code-gen
lib.rslocal-reconstruction-code-gen
version0.1.0
sourcesrc
created_at2020-06-29 18:48:36.949422
updated_at2020-06-29 18:48:36.949422
descriptionGenerate encode matrices for Local Reconstruction Codes
homepage
repositoryhttps://gitlab.com/kschibli/local-reconstruction-code-gen
max_upload_size
id259501
size9,555
(kschibli)

documentation

README

local-reconstruction-code-gen

This crate provides a function that generates encode matrices for Local Reconstruction Codes as described in the paper Erasure Coding in Windows Azure Storage by Huang et al.

The implementation only supports values of r of size up to (including) 2.

Example

This example shows how to create an encode matrix for a (6,2,2) Local Reconstruction Code. You must specify an an implementation of the GaloisField trait as a type argument. Both the trait and macros to generate types are found in the g2p crate.

use local_reconstruction_code_gen::gen_encode_matrix;

g2p::g2p!(GF16, 4, modulus: 0b10011);

fn example() {
    let encode_matrix = gen_encode_matrix::<GF16>(k, l, r)
        .unwrap()
        .collect::<Vec<_>>();
}
Commit count: 1

cargo fmt