fountain

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Unlicense Imports: 10 Imported by: 0

Documentation

Overview

Package fountain implements the fountain encoding used by the Uniform Resources (UR) format described in BCR-2020-005.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checksum

func Checksum(data []byte) uint32

func Encode

func Encode(message []byte, seqNum, seqLen int) []byte

func SeqNumFor

func SeqNumFor(seqLen int, checksum uint32, fragments []int) int

SeqNumFor searches for a seqNum that outpus the xor of fragments.

Types

type Decoder

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

func (*Decoder) Add

func (d *Decoder) Add(data []byte) error

func (*Decoder) Progress

func (d *Decoder) Progress() float32

func (*Decoder) Result

func (d *Decoder) Result() ([]byte, error)

Jump to

Keyboard shortcuts

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