Documentation
¶
Index ¶
- Constants
- func ConvertSignedTemplate[T SignedNumber](r *ByteReader, processNonDigit func(uint, uint, T) (uint, error), ...) (T, uint, error)
- func ConvertTemplate[T Number](r *ByteReader, processNonDigit func(uint, uint, T) (uint, error), ...) (T, uint, error)
- func GetTypeKind[T any]() reflect.Kind
- func ProcessDigit[T constraints.Integer](digit uint, flags uint, res T) (T, uint)
- func ProcessFloatNonDigit[T constraints.Float](digit uint, flags uint, res T) (uint, error)
- func ProcessIntNonDigit[T constraints.Signed](digit uint, flags uint, res T) (uint, error)
- func ProcessNonDigit[T Number](digit uint, flags uint, res T) (uint, error)
- func ProcessSignedNonDigit[T SignedNumber](digit uint, flags uint, res T) (uint, error)
- func ProcessUintNonDigit[T constraints.Unsigned](digit uint, flags uint, res T) (uint, error)
- type ByteReader
- type Number
- type SignedNumber
- type SliceReader
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func ConvertSignedTemplate ¶ added in v1.0.1
func ConvertTemplate ¶ added in v1.0.1
func GetTypeKind ¶ added in v1.0.1
func ProcessDigit ¶
func ProcessDigit[T constraints.Integer](digit uint, flags uint, res T) (T, uint)
func ProcessFloatNonDigit ¶
func ProcessIntNonDigit ¶
func ProcessSignedNonDigit ¶
func ProcessSignedNonDigit[T SignedNumber](digit uint, flags uint, res T) (uint, error)
func ProcessUintNonDigit ¶
Types ¶
type ByteReader ¶
type ByteReader struct {
// contains filtered or unexported fields
}
func NewByteReader ¶
func NewByteReader(r io.Reader, chunkSize int) *ByteReader
func (*ByteReader) NextByte ¶
func (r *ByteReader) NextByte() (byte, error)
func (*ByteReader) NextDataByte ¶
func (r *ByteReader) NextDataByte() (byte, error)
func (*ByteReader) NextDigit ¶
func (r *ByteReader) NextDigit() (uint, error)
type Number ¶
type Number interface { constraints.Float | constraints.Integer }
type SignedNumber ¶
type SignedNumber interface { constraints.Float | constraints.Signed }
type SliceReader ¶
type SliceReader[T any] struct { Buf1 []T Buf2 [][]T Buf3 [][][]T // contains filtered or unexported fields }
func NewSliceReader ¶
func NewSliceReader[T any]( byteReader *ByteReader, conv func(*ByteReader) (T, uint, error), dim uint, ) *SliceReader[T]
func RunSliceReader ¶
func RunSliceReader[T any]( r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error), dim uint) (*SliceReader[T], error)
func (*SliceReader[T]) Run ¶
func (s *SliceReader[T]) Run() error
Click to show internal directories.
Click to hide internal directories.