gorrect

package module
v0.0.0-...-9d0be6f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2019 License: BSD-3-Clause Imports: 1 Imported by: 1

README

gorrect

libcorrect go wrapper

Documentation

Index

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL