Generator

RandomUniform

class pyerasure.generator.RandomUniform(field: Union[Binary, Binary4, Binary8], symbols)

Uniform random block generator.

property field: Union[Binary, Binary4, Binary8]

The chosen finite field.

generate() bytes

Generate the coefficients.

generate_partial(rank: int) bytes

Generate the coefficients.

generate_recode(decoder: Decoder) bytes

Generate coefficients based on the decoder state.

Parameters
decoder – The decoder to query for the current symbol state.
set_seed(seed: int)

Set the state of the coefficient generator. The coefficient generator will always produce the same set of coefficients for a given seed.

Parameters
seed – The seed that will set the state of the generator.
property symbols: int

The number of symbols.

RSCauchy

class pyerasure.generator.RSCauchy(field: Union[Binary4, Binary8], symbols)

A Reed-Solomon-Cauchy generator

property field: Union[Binary4, Binary8]

The chosen finite field.

generate() Tuple[bytes, int]

Generates the coefficients.

Returns
A tuple containing the coefficients and the index of the generated coefficients. The index can be used with RSCauchy.generate_specific() to recreate the coefficients at a later time.
generate_specific(index: int) bytes

Generate a specific set of coefficients.

Parameters
index – The index of the coefficients to generate. The index must be less than or equal to RSCauchy.repair_symbols
Returns
The coefficients.
remaining_repair_symbols()

The number of remaining repair symbols.

property repair_symbols: int

Return the number of repair symbols supported by this generator.

property symbols: int

The number of symbols.

Fork me on GitHub
Versions
1.3.0
1.2.0
1.1.0
1.0.1
1.0.0
Development
latest