A source block encoder is retrieved from a {@link DataEncoder} object, which is associated to some source data.Source data is divided into source blocks and each source block is independently encoded by an instance of this interface. The source block being encoded is divided into source symbols, which together with repair symbols (extra encoded data) form the encoding symbols. The encoding symbols are transmitted inside encoding packets to a RaptorQ decoder (as specified in RFC 6330).
A source block can be encoded by an instance of this interface, independently from other source blocks, and the block is identified by a source block number, which is carried inside an encoding packet. The method {@link #sourceBlockNumber()} provides the source block number that identifies the source block being encoded.Additionally, the number of source symbols into which the source block is divided is given by the method {@link #numberOfSourceSymbols()}.
The method {@link #encodingPacket(int)} returns an encoding packet with a specific encoding symbol. The methods{@link #sourcePacketsIterable()} and {@link #repairPacketsIterable(int)} return iterable objects that iterate overall source packets (encoding packets with a source symbol each) and over some repair packets (encoding packets with a repair symbol each). More customizable iterable objects can be created using the {@link IterableBuilder} class.
|
|