Versions in this module Expand all Collapse all v0 v0.1.1 Jul 18, 2026 v0.1.0 Jul 18, 2026 Changes in this version + const MaxEncodingSymbolID + const MaxIntermediateSymbols + const MaxSourceSymbolsPerBlock + const MaxTransferLength + const OTIEncodedSize + const PayloadIDEncodedSize + var ErrInvalidDerivation = errors.New("raptorgo: invalid RFC parameter derivation input") + var ErrInvalidLimits = errors.New("raptorgo: invalid limits") + var ErrInvalidOTI = errors.New("raptorgo: invalid object transmission information") + var ErrInvalidObject = errors.New("raptorgo: invalid source object") + var ErrInvalidPacket = errors.New("raptorgo: invalid encoding packet") + var ErrInvalidPayloadID = errors.New("raptorgo: invalid FEC payload ID") + var ErrLimitExceeded = errors.New("raptorgo: resource limit exceeded") + var ErrObjectDecoder = errors.New("raptorgo: object decoder failed") + var ErrObjectDelivery = errors.New("raptorgo: verified object delivery failed") + var ErrObjectEncoder = errors.New("raptorgo: object encoder failed") + var ErrObjectTerminal = errors.New("raptorgo: object decoder is terminal") + var ErrObjectVerification = errors.New("raptorgo: decoded object verification failed") + func ObjectDecoderWorkspaceBackingBytes(oti OTI, limits Limits) (uint64, error) + func ObjectEncoderWorkspaceBackingBytes(oti OTI, limits Limits) (uint64, error) + func SourceBlockSymbols(oti OTI, sourceBlockNumber uint8) (uint32, error) + type DerivationInput struct + DecoderBlockBytes uint64 + MaxPayloadSize uint16 + MinSubSymbolAlignmentUnits uint32 + SymbolAlignment uint8 + TransferLength uint64 + type EncodingPacketView struct + func ParseEncodingPacket(encoded []byte, oti OTI, limits Limits) (EncodingPacketView, error) + func (packet EncodingPacketView) CopySymbol(index uint32, destination []byte) error + func (packet EncodingPacketView) IsSource() bool + func (packet EncodingPacketView) Payload() []byte + func (packet EncodingPacketView) PayloadID() PayloadID + func (packet EncodingPacketView) Symbol(index uint32) ([]byte, error) + func (packet EncodingPacketView) SymbolCount() uint32 + type Limits struct + MaxDecodeAttempts uint32 + MaxDenseCompletionSymbols uint32 + MaxPacketBytes uint64 + MaxRepairSymbolsPerBlock uint32 + MaxRetainedSymbols uint32 + MaxSourceBlockBytes uint64 + MaxSourceBlocks uint8 + MaxSourceSymbolsPerBlock uint32 + MaxSubBlocks uint16 + MaxSymbolAlignment uint8 + MaxSymbolSize uint16 + MaxSymbolsPerPacket uint32 + MaxTransferLength uint64 + MaxWorkingMemory uint64 + func DefaultLimits() Limits + func RFCWireLimits() Limits + func (limits Limits) Validate() error + type OTI struct + SourceBlocks uint8 + SubBlocks uint16 + SymbolAlignment uint8 + SymbolSize uint16 + TransferLength uint64 + func DeriveOTI(input DerivationInput, limits Limits) (OTI, error) + func ParseOTI(encoded []byte, limits Limits) (OTI, error) + func (oti OTI) MarshalBinary() ([]byte, error) + func (oti OTI) Validate(limits Limits) error + type ObjectDecoder struct + func NewObjectDecoder(oti OTI, limits Limits, context string, verify ObjectVerifier, ...) (*ObjectDecoder, error) + func (decoder *ObjectDecoder) AddPacket(encoded []byte) (ObjectDecoderState, error) + func (decoder *ObjectDecoder) CompletedBlocks() uint32 + func (decoder *ObjectDecoder) PersistentBackingBytes() uint64 + func (decoder *ObjectDecoder) State() ObjectDecoderState + type ObjectDecoderState uint8 + const ObjectDecodeFailed + const ObjectDecoded + const ObjectDelivered + const ObjectDeliveryFailed + const ObjectReceiving + const ObjectVerificationFailed + const ObjectVerified + func (state ObjectDecoderState) String() string + type ObjectDeliverer func(VerifiedObject) error + type ObjectEncoder struct + func NewObjectEncoder(object []byte, oti OTI, limits Limits) (*ObjectEncoder, error) + func (encoder *ObjectEncoder) OTI() OTI + func (encoder *ObjectEncoder) Packet(sourceBlockNumber uint8, firstESI, symbolCount uint32, shortenFinal bool) ([]byte, error) + func (encoder *ObjectEncoder) PacketInto(destination []byte, sourceBlockNumber uint8, firstESI, symbolCount uint32, ...) ([]byte, error) + type ObjectVerifier func(VerificationRequest) error + type PayloadID struct + EncodingSymbolID uint32 + SourceBlockNumber uint8 + func NewPayloadID(sourceBlockNumber uint8, encodingSymbolID uint32) (PayloadID, error) + func ParsePayloadID(encoded []byte) (PayloadID, error) + func (id PayloadID) MarshalBinary() ([]byte, error) + type SourceBlock struct + func BuildSourceBlock(object []byte, oti OTI, sourceBlockNumber uint8, limits Limits) (SourceBlock, error) + func (block SourceBlock) Number() uint8 + func (block SourceBlock) Symbol(index uint32) ([]byte, error) + func (block SourceBlock) SymbolCount() uint32 + func (block SourceBlock) SymbolSize() uint16 + type VerificationRequest struct + Context string + Length uint64 + OTI OTI + Object io.Reader + type VerifiedObject struct + Bytes []byte + Context string + OTI OTI