Versions in this module Expand all Collapse all v1 v1.0.2 Aug 16, 2022 v1.0.1 Aug 8, 2022 Changes in this version + var ErrEof = errors.New("got EOF, can not get the next byte") + var ErrRange = errors.New("value out of range") + func GetVarUintSize(value uint64) int + func ReadBool(reader io.Reader) (bool, error) + func ReadByte(reader io.Reader) (byte, error) + func ReadBytes(reader io.Reader, length uint64) ([]byte, error) + func ReadUint16(reader io.Reader) (uint16, error) + func ReadUint32(reader io.Reader) (uint32, error) + func ReadUint64(reader io.Reader) (uint64, error) + func ReadUint8(reader io.Reader) (uint8, error) + func ReadVarBytes(reader io.Reader) ([]byte, error) + func ReadVarString(reader io.Reader) (string, error) + func ReadVarUint(reader io.Reader, maxint uint64) (uint64, error) + func WriteBool(writer io.Writer, val bool) error + func WriteByte(writer io.Writer, val byte) error + func WriteDataList(w io.Writer, list []SerializableData) error + func WriteUint16(writer io.Writer, val uint16) error + func WriteUint32(writer io.Writer, val uint32) error + func WriteUint64(writer io.Writer, val uint64) error + func WriteUint8(writer io.Writer, val uint8) error + func WriteVarBytes(writer io.Writer, value []byte) error + func WriteVarString(writer io.Writer, value string) error + func WriteVarUint(writer io.Writer, value uint64) error + type SerializableData interface + Deserialize func(r io.Reader) error + Serialize func(w io.Writer) error + func ReadDataList(reader io.Reader) ([]SerializableData, error)