local-reconstruction-code-gen 0.1.0

Generate encode matrices for Local Reconstruction Codes
Documentation
  • Coverage
  • 50%
    4 out of 8 items documented2 out of 4 items with examples
  • Size
  • Source code size: 9.55 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.48 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • kschibli/local-reconstruction-code-gen
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kschibli

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<_>>();
}