Skip to content

Commit

Permalink
feat!: implement reconstruct for leopard ffe8
Browse files Browse the repository at this point in the history
  • Loading branch information
zvolin committed Feb 26, 2024
1 parent 502b26a commit 42745c8
Show file tree
Hide file tree
Showing 3 changed files with 278 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ The 8-bit implementation should be used with up to 256 total shards and 16-bit w
shards are needed.

- [x] Encoding parity shards using 8-bit leopard algorithm
- [ ] Reconstructing shards using 8-bit leopard algorithm
- [x] Reconstructing shards using 8-bit leopard algorithm
- [ ] Encoding parity shards using 16-bit leopard algorithm
- [ ] Reconstructing shards using 16-bit leopard algorithm
4 changes: 2 additions & 2 deletions go-leopard/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Rust wrapper over Go's reedsolomon module

use std::ffi::c_uchar;
use std::{ffi::c_uchar, ops::DerefMut};

use thiserror::Error;

Expand All @@ -26,7 +26,7 @@ pub enum Error {

/// Encode the shards using the Go's reedsolomon module
pub fn encode(
shards: &mut [&mut [u8]],
shards: &mut [impl DerefMut<Target = [u8]>],
data_shards: usize,
shard_size: usize,
) -> Result<(), Error> {
Expand Down
Loading

0 comments on commit 42745c8

Please sign in to comment.