Documentation ¶
Overview ¶
Package gereedsolomon provides Reed-Solomon implementations of the gerasure interfaces, by wrapping the github.com/klauspost/reedsolomon package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder is a wrapper around reedsolomon.Encoder satisfying the gerasure.Encoder interface.
func NewEncoder ¶
func NewEncoder(rs reedsolomon.Encoder) Encoder
NewEncoder returns a new Encoder. The options within the given reedsolomon.Encoder determine the number of shards.
type Reconstructor ¶
type Reconstructor struct {
// contains filtered or unexported fields
}
Reconstructor is a wrapper around reedsolomon.Encoder satisfying the gerasure.Reconstructor interface.
func NewReconstructor ¶
func NewReconstructor(rs reedsolomon.Encoder, shardSize int) *Reconstructor
NewReconstructor returns a new Reconstructor. The options within the given reedsolomon.Encoder determine the number of shards. The shardSize and totalDataSize must be discovered out of band;
func (*Reconstructor) Data ¶
func (r *Reconstructor) Data(dst []byte, dataSize int) ([]byte, error)
Data satisfies gerasure.Reconstructor.
func (*Reconstructor) ReconstructData ¶
ReconstructData satisfies gerasure.Reconstructor. We assume that the caller is keeping track of already marked indices; nothing should go wrong if the same index is used more than once, but it will waste some CPU cycles.