Documentation ¶
Index ¶
Constants ¶
View Source
const IndexSize = 24
Variables ¶
View Source
var ( ErrInvalid = errors.New("vsb.codec: invalid argument") ErrBufferNotEnough = errors.New("vsb.codec: buffer not enough") ErrIncompletePacket = errors.New("vsb.codec: incomplete packet") ErrCorruptedPacket = errors.New("vsb.codec: corrupted packet") ErrCorruptedRecord = errors.New("vsb.codec: corrupted record") ErrUnknownRecord = errors.New("vsb.codec: unknown record") )
Functions ¶
This section is empty.
Types ¶
type EntryDecoder ¶
type EntryDecoder interface { Unmarshal(data []byte) (int, block.Entry, error) UnmarshalLast(data []byte) (int, block.Entry, error) UnmarshalReader(r io.ReadSeeker) (int, block.Entry, error) }
func NewDecoder ¶
func NewDecoder(checkCRC bool, indexSize int) (EntryDecoder, error)
type EntryEncoder ¶
type EntryEncoder interface { Size(entry block.Entry) int MarshalTo(entry block.Entry, buf []byte) (int, error) }
func NewEncoder ¶
func NewEncoder() EntryEncoder
type PacketDataDecoder ¶
type PacketDataEncoder ¶
type RecordDataDecoder ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.