Fountain codes are forward error correction codes for erasure channels. They are able to recover lost packets without needing a backchannel. As a rateless code, transmitters generate packets at random, on the fly. Receivers then listen to as many packets as needed to reconstruct the message.
- data Droplet a = Droplet IntSet a
- data Decoder a
- type Precoding = [IntSet]
- precoding :: Int -> Int -> Int -> (Int, Int) -> Precoding
- droplets :: (Num a, Bits a) => Int -> Int -> Precoding -> [a] -> [Droplet a]
- decoder :: (Num a, Bits a) => Int -> Precoding -> Decoder a
- decode :: (Num a, Bits a) => Decoder a -> Droplet a -> (Decoder a, Maybe [a])
- test :: Int -> Int -> Precoding -> Int -> (Int, Bool, [Decoder Word8])
- test' :: Int -> Int -> Int -> (Int, Int) -> Int -> (Int, Bool, [Decoder Word8])
- decoderProgress :: Decoder a -> String
A message droplet is a set of message indices and the combined symbol.
Generates a random precoding matrix.
precoding seed messageLength extraSymbols boundaries
An infinite list of droplets, given a seed, the max degree, precoding, and a message.
Creates a new decoder given a message length and the precoding.
Runs a test of a [Word8] message given the message length, max droplet degree, and a seed. Returns the number of droplets that were needed to decode the message and if the message was sucessfully decoded.
Runs a test with a randomly generated precoding.
test' messageLength dropletMaxDegree extraSymbols (precodingMinDegree, precodingMaxDegree) seed