Documentation ¶
Index ¶
- Constants
- func ReadBool(r io.Reader) (bool, error)
- func ReadFloat32(r io.Reader) (float32, error)
- func ReadFloat64(r io.Reader) (float64, error)
- func ReadInt16(r io.Reader) (int16, error)
- func ReadInt32(r io.Reader) (int32, error)
- func ReadInt64(r io.Reader) (int64, error)
- func ReadInt8(r io.Reader) (int8, error)
- func ReadN(r io.Reader, buf []byte, length int) error
- func ReadString(r io.Reader) (string, error)
- func ReadUint16(r io.Reader) (uint16, error)
- func ReadUint32(r io.Reader) (uint32, error)
- func ReadUint64(r io.Reader) (uint64, error)
- func ReadUint8(r io.Reader) (uint8, error)
- func WriteBool(b bool, w io.Writer) error
- func WriteFloat32(f float32, w io.Writer) error
- func WriteFloat64(f float64, w io.Writer) error
- func WriteInt16(i int16, w io.Writer) error
- func WriteInt32(i int32, w io.Writer) error
- func WriteInt64(i int64, w io.Writer) error
- func WriteInt8(i int8, w io.Writer) error
- func WriteN(w io.Writer, buf []byte, length int) error
- func WriteString(s string, w io.Writer) error
- func WriteUint16(i uint16, w io.Writer) error
- func WriteUint32(i uint32, w io.Writer) error
- func WriteUint64(i uint64, w io.Writer) error
- func WriteUint8(i uint8, w io.Writer) error
Constants ¶
const MaxStringSize = uint32(10 * 1024 * 1024)
MaxStringSize the longest string allowed.
Variables ¶
This section is empty.
Functions ¶
func ReadFloat32 ¶
ReadFloat32 read a little endian float32
func ReadFloat64 ¶
ReadFloat64 read a little endian float64
func ReadN ¶
ReadN tries and retries to read length bytes from r. Reading length with io.EOF is not considered an error. Forwards io.EOF if nothing was read.
func ReadString ¶
ReadString reads a string: first the size of the string is read using ReadUint32, then the bytes of the string.
func ReadUint16 ¶
ReadUint16 reads a little endian uint16
func ReadUint32 ¶
ReadUint32 reads a little endian uint32
func ReadUint64 ¶
ReadUint64 read a little endian uint64
func WriteFloat32 ¶
WriteFloat32 writes a little endian float32
func WriteFloat64 ¶
WriteFloat64 writes a little endian float64
func WriteInt16 ¶
WriteInt16 writes a little endian int16
func WriteInt32 ¶
WriteInt32 writes a little endian int32
func WriteInt64 ¶
WriteInt64 writes a little endian int64
func WriteN ¶
WriteN tries and retries to write length bytes into w. Writing length with io.EOF is not considered an error. Forwards io.EOF if nothing was written.
func WriteString ¶
WriteString writes a string: first the size of the string is written using WriteUint32, then the bytes of the string.
func WriteUint16 ¶
WriteUint16 writes a little endian uint16
func WriteUint32 ¶
WriteUint32 writes a little endian uint32
func WriteUint64 ¶
WriteUint64 writes a little endian uint64
Types ¶
This section is empty.