Versions in this module Expand all Collapse all v0 v0.1.20 Jul 19, 2023 v0.1.19 Jul 6, 2023 Changes in this version + type Segment struct + DEnd int + DStart int + Last int + PEnd int + SLen int + func (s Segment) String() (o string) + type Segments []Segment + func NewSegments(payloadLen, segmentSize, overhead, parity int) (s Segments) + func (s Segments) AddParity(segs [][]byte) (shards [][]byte, e error) + func (s Segments) String() (o string) v0.1.18 Jul 2, 2023 v0.1.17 Jul 1, 2023 v0.1.16 Jul 1, 2023 v0.1.15 Jun 17, 2023 v0.1.14 Jun 7, 2023 v0.1.13 Jun 7, 2023 Changes in this version + const ErrDupe + const ErrEmptyBytes + const ErrLostNoRedundant + const ErrMismatch + const ErrNotEnough + const Overhead + const PacketMagic + func EncodePacket(ep *PacketParams) (pkt []byte, e error) + func GetKeysFromPacket(d []byte) (from *crypto.Pub, to crypto.CloakedPubKey, iv nonce.IV, e error) + func SplitToPackets(pp *PacketParams, segSize int, ks *crypto.KeySet) (dataShards int, packets [][]byte, e error) + type Packet struct + Data []byte + ID nonce.ID + Length uint32 + Parity byte + Seq uint16 + TimeStamp time.Time + func DecodePacket(d []byte, from *crypto.Pub, to *crypto.Prv, iv nonce.IV) (f *Packet, e error) + func (p *Packet) GetOverhead() int + type PacketParams struct + Data []byte + From *crypto.Prv + ID nonce.ID + Length int + Parity int + Seq int + To *crypto.Pub + func (ep PacketParams) GetOverhead() int + type PacketSegment struct + DEnd int + DStart int + Last int + PEnd int + SLen int + func (s PacketSegment) String() (o string) + type PacketSegments []PacketSegment + func NewPacketSegments(payloadLen, segmentSize, overhead, parity int) (s PacketSegments) + func (s PacketSegments) AddParity(segs [][]byte) (shards [][]byte, e error) + func (s PacketSegments) String() (o string) + type Packets []*Packet + func JoinPackets(packets Packets) (pkts Packets, msg []byte, e error) + func RemovePacket(slice Packets, s int) Packets + func (p Packets) Len() int + func (p Packets) Less(i, j int) bool + func (p Packets) Swap(i, j int)