Documentation ¶
Index ¶
- type ConvolutionCoder
- func (cc *ConvolutionCoder) Close()
- func (cc *ConvolutionCoder) Decode(data []byte) (output []byte)
- func (cc *ConvolutionCoder) DecodeSoft(data []byte) (output []byte)
- func (cc *ConvolutionCoder) DecodedSize(numBits int) int
- func (cc *ConvolutionCoder) Encode(data []byte) (output []byte)
- func (cc *ConvolutionCoder) EncodeSoft(data []byte) (output []byte)
- func (cc *ConvolutionCoder) EncodedSize(dataLength int) int
- type ReedSolomon
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConvolutionCoder ¶
type ConvolutionCoder struct {
// contains filtered or unexported fields
}
func MakeConvolutionCoder ¶
func MakeConvolutionCoder(r, k int, poly []uint16) *ConvolutionCoder
MakeConvolutionCoder creates a new Convolution Decoder / Encoder for r => rate, k => order and specified polys
func (*ConvolutionCoder) Close ¶
func (cc *ConvolutionCoder) Close()
Close cleans the Convolution Coder native resources
func (*ConvolutionCoder) Decode ¶
func (cc *ConvolutionCoder) Decode(data []byte) (output []byte)
Decode decodes a byte array containing 8 hard symbols per byte
func (*ConvolutionCoder) DecodeSoft ¶
func (cc *ConvolutionCoder) DecodeSoft(data []byte) (output []byte)
DecodeSoft decodes a byte array containing one bit per byte as soft symbol (0 as 0, 1 as 255)
func (*ConvolutionCoder) DecodedSize ¶
func (cc *ConvolutionCoder) DecodedSize(numBits int) int
DecodedSize return number of decoded bytes given numBits input data
func (*ConvolutionCoder) Encode ¶
func (cc *ConvolutionCoder) Encode(data []byte) (output []byte)
Encode encodes the byte array (each output byte has 8 encoded bits)
func (*ConvolutionCoder) EncodeSoft ¶
func (cc *ConvolutionCoder) EncodeSoft(data []byte) (output []byte)
EncodeSoft encodes the byte array to "soft" symbols (each output byte as one bit, 0 for 0 and 255 for 1)
func (*ConvolutionCoder) EncodedSize ¶
func (cc *ConvolutionCoder) EncodedSize(dataLength int) int
EncodedSize return number of encoded bits given dataLength bytes of data
type ReedSolomon ¶
type ReedSolomon struct {
// contains filtered or unexported fields
}
func MakeReedSolomon ¶
func MakeReedSolomon(blockSize, dataSize, minDistance int, poly uint16) *ReedSolomon
func (*ReedSolomon) Close ¶
func (rs *ReedSolomon) Close()
func (*ReedSolomon) Decode ¶
func (rs *ReedSolomon) Decode(data []byte) (outData []byte, errors int)
func (*ReedSolomon) Encode ¶
func (rs *ReedSolomon) Encode(data []byte) (outData []byte)