encoder

package
v1.17.12 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Stream Encoder for erasure coding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StreamEncoder

type StreamEncoder struct {
	// contains filtered or unexported fields
}

func NewEncoder

func NewEncoder(iDataShards, iParityShards int) (*StreamEncoder, error)

Creates New encoder instance and return index for further access

func (*StreamEncoder) Decode

func (e *StreamEncoder) Decode(in [][]byte, shardSize int) ([]byte, error)

func (*StreamEncoder) Encode

func (e *StreamEncoder) Encode(in []byte) ([][]byte, error)

Encodes and returns the shards on success and error on fails

Jump to

Keyboard shortcuts

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