gf256 0.3.1

A Rust library containing Galois-field types and utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! ``` rust
//! use gf256::rs::rs255w223;
//! 
//! // encode
//! let mut buf = b"Hello World!".to_vec();
//! buf.resize(buf.len()+32, 0u8);
//! rs255w223::encode(&mut buf);
//! 
//! // corrupt
//! buf[0..16].fill(b'x');
//! 
//! // correct
//! rs255w223::correct_errors(&mut buf)?;
//! assert_eq!(&buf[0..12], b"Hello World!");
//! # Ok::<(), rs255w223::Error>(())
//! ```