Documentation ¶
Overview ¶
Package yenc implements readers writers for the YENC encoding format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrBadCRC ¶
type ErrBadCRC struct {
Expected, Actual uint32
}
ErrBadCRC is returned when a CRC does not match
type ErrWrongSize ¶
type ErrWrongSize struct {
Expected, Actual int
}
ErrWrongSize is returned when a part or file is not the expected full size
type Header ¶
Header is a map type for reading a serialized yenc header.
func ReadYENCHeader ¶
ReadYENCHeader accepts a byte slice and returns a YENCHeader or any error encountered while decoding, and the header length so that the consumer can ignore the appropriate bytes.
type Reader ¶
type Reader struct { Length int ExpectedCRC uint32 CRC hash.Hash32 // contains filtered or unexported fields }
Reader implements the io.Reader methods for an underlying YENC document/stream. It additionally exposes some of the metadata that may be useful for consumers.
Click to show internal directories.
Click to hide internal directories.