Documentation ¶
Index ¶
- Variables
- func Float32(buf []byte) float32
- func Float64(buf []byte) float64
- func Int16(buf []byte) int16
- func Int32(buf []byte) int32
- func Int64(buf []byte) int64
- func Int8(buf byte) int8
- func Read4Times[T any](f func() T) [4]T
- func Read8Times[T any](f func() T) [8]T
- func Uint16(buf []byte) uint16
- func Uint32(buf []byte) uint32
- func Uint64(buf []byte) uint64
- func Uint8(buf byte) uint8
- type Decoder
- func (d *Decoder) Byte() byte
- func (d *Decoder) Float32() float32
- func (d *Decoder) Float64() float64
- func (d *Decoder) Index() int
- func (d *Decoder) Int16() int16
- func (d *Decoder) Int32() int32
- func (d *Decoder) Int64() int64
- func (d *Decoder) Int8() int8
- func (d *Decoder) LeftToRead() int
- func (d *Decoder) Len() int
- func (d *Decoder) Read(p []byte) int
- func (d *Decoder) Read48() [48]byte
- func (d *Decoder) Seek(offset int)
- func (d *Decoder) Skip(offset int)
- func (d *Decoder) Uint16() uint16
- func (d *Decoder) Uint32() uint32
- func (d *Decoder) Uint64() uint64
- func (d *Decoder) Uint8() uint8
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBufferNotLargeEnough is returned when the buffer is not large enough to read the requested data ErrBufferNotLargeEnough = errors.New("buffer not large enough") )
Functions ¶
func Read4Times ¶
func Read4Times[T any](f func() T) [4]T
Read4Times reads a value from a function 4 times and returns an array of the values
func Read8Times ¶
func Read8Times[T any](f func() T) [8]T
Read8Times reads a value from a function 8 times and returns an array of the values
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func (*Decoder) LeftToRead ¶
LeftToRead returns the amount of bytes left to read
Click to show internal directories.
Click to hide internal directories.