Documentation ¶
Index ¶
- Constants
- func ConvertBool(r *ByteReader) (bool, uint, error)
- func ConvertByte(r *ByteReader) (byte, uint, error)
- func ConvertFloat[T constraints.Float](r *ByteReader) (T, uint, error)
- func ConvertSigned[T constraints.Signed](r *ByteReader) (T, uint, error)
- func ConvertUnsigned[T constraints.Unsigned](r *ByteReader) (T, uint, error)
- func GetConversion[T any]() func(r *ByteReader) (T, uint, error)
- func Read[T any](reader io.Reader) (T, error)
- func Read0D[T any](r io.Reader) (T, error)
- func Read0DCustom[T any](r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error)) (T, error)
- func Read1D[T any](r io.Reader) ([]T, error)
- func Read1DCustom[T any](r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error)) ([]T, error)
- func Read2D[T any](r io.Reader) ([][]T, error)
- func Read2DCustom[T any](r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error)) ([][]T, error)
- func Read3D[T any](r io.Reader) ([][][]T, error)
- func Read3DCustom[T any](r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error)) ([][][]T, error)
- func ReadCustom[T any](reader io.Reader, chunkSize int) (T, error)
- type ByteReader
Constants ¶
View Source
const ( // Newline found when reading current element HasNewlineFlag = ite.HasNewline // Current element has at least one digit HasValueFlag = ite.HasValue )
View Source
const ( // Default buffer size for ByteReader DefaultChunkSize int = 32768 )
Variables ¶
This section is empty.
Functions ¶
func ConvertBool ¶
func ConvertBool(r *ByteReader) (bool, uint, error)
Conversion function for type bool
func ConvertByte ¶
func ConvertByte(r *ByteReader) (byte, uint, error)
Conversion function for type byte
func ConvertFloat ¶
func ConvertFloat[T constraints.Float](r *ByteReader) (T, uint, error)
Conversion function for type float
func ConvertSigned ¶
func ConvertSigned[T constraints.Signed](r *ByteReader) (T, uint, error)
Conversion function for floats and integers
func ConvertUnsigned ¶
func ConvertUnsigned[T constraints.Unsigned](r *ByteReader) (T, uint, error)
Conversion function for unsigned integers
func GetConversion ¶ added in v1.0.1
func GetConversion[T any]() func(r *ByteReader) (T, uint, error)
Returns conversion function for generic type T
func Read0DCustom ¶ added in v1.0.4
func Read0DCustom[T any]( r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error)) (T, error)
Read one element of type T from a Reader with options
func Read1DCustom ¶ added in v1.0.1
func Read1DCustom[T any]( r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error)) ([]T, error)
Read a 1D slice of type T from a Reader with options
func Read2DCustom ¶ added in v1.0.1
func Read2DCustom[T any]( r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error)) ([][]T, error)
Read a 2D slice of type T from a Reader with options
func Read3DCustom ¶ added in v1.0.1
func Read3DCustom[T any]( r io.Reader, chunkSize int, conv func(*ByteReader) (T, uint, error)) ([][][]T, error)
Read a 3D slice of type T from a Reader with options
Types ¶
Click to show internal directories.
Click to hide internal directories.