#fec #raptorq #api-bindings #codec #fountain-code

wirehair-wrapper

Rust wrapper for https://github.com/catid/wirehair

4 releases

0.1.3 Aug 15, 2019
0.1.2 Aug 15, 2019
0.1.1 Aug 2, 2019
0.1.0 Aug 2, 2019

#1582 in Encoding

MIT license

300KB
5K SLoC

C++ 4.5K SLoC // 0.2% comments Rust 268 SLoC // 0.1% comments

Rust wrapper for Wirehair - O(N) Fountain Code for Large Data

Wirehair is a FEC library done by https://github.com/catid

API

pub fn wirehair_init() -> Result<(), WirehairError> {}

pub fn WirehairEncoder::new(
    message: &mut [u8], 
    message_size_bytes: u64, 
    block_size_bytes: u32
) -> WirehairEncoder {}

pub fn WirehairEncoder::encode(
    &self, 
    block_id: u64, 
    block: &mut [u8], 
    block_size: u32, 
    block_out_bytes: &mut u32
) -> Result<WirehairResult, WirehairError> {}


pub fn WirehairDecoder::new(message_size_bytes: u64, block_size_bytes: u32) -> WirehairDecoder {}

pub fn WirehairDecoder::decode(
    &self, 
    block_id: u64, 
    block: &[u8], 
    block_out_size_bytes: u32
) -> Result<WirehairResult, WirehairError> {}

pub fn WirehairDecoder::recover(
    &self, 
    message: &mut [u8], 
    message_size_bytes: u64
) -> Result<WirehairResult, WirehairError> {}

pub fn wirehair_decoder_to_encoder(decoder: WirehairDecoder) -> Result<WirehairEncoder, WirehairError> {}

No runtime deps

~170KB