2021-11-16 23:55:07 +03:00
|
|
|
// Code below generated from scalar_gen.go.tmpl
|
2021-11-05 17:04:26 +03:00
|
|
|
package decode
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/wader/fq/pkg/bitio"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Type BitBuf
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// ActualBitBuf asserts actual value is a BitBuf and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) ActualBitBuf() *bitio.Buffer {
|
|
|
|
v, ok := s.Actual.(*bitio.Buffer)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Actual %v as *bitio.Buffer", s.Actual))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// SymBitBuf asserts symbolic value is a BitBuf and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) SymBitBuf() *bitio.Buffer {
|
|
|
|
v, ok := s.Sym.(*bitio.Buffer)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Sym %v as *bitio.Buffer", s.Sym))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldBitBufScalarFn tries to add a field, calls scalar functions and returns actual value as a BitBuf
|
|
|
|
func (d *D) TryFieldBitBufScalarFn(name string, fn func(d *D) (Scalar, error), sfns ...ScalarFn) (*bitio.Buffer, error) {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d) }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return v.ActualBitBuf(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldBitBufScalarFn adds a field, calls scalar functions and returns actual value as a BitBuf
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldBitBufScalarFn(name string, fn func(d *D) Scalar, sfns ...ScalarFn) *bitio.Buffer {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "BitBuf", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v.ActualBitBuf()
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// FieldBitBufFn adds a field, calls *bitio.Buffer decode function and returns actual value as a BitBuf
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldBitBufFn(name string, fn func(d *D) *bitio.Buffer, sfns ...ScalarFn) *bitio.Buffer {
|
|
|
|
return d.FieldBitBufScalarFn(name, func(d *D) Scalar { return Scalar{Actual: fn(d)} }, sfns...)
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// TryFieldBitBufFn tries to add a field, calls *bitio.Buffer decode function and returns actual value as a BitBuf
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldBitBufFn(name string, fn func(d *D) (*bitio.Buffer, error), sfns ...ScalarFn) (*bitio.Buffer, error) {
|
|
|
|
return d.TryFieldBitBufScalarFn(name, func(d *D) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldScalarBitBufFn tries to add a field, calls *bitio.Buffer decode function and returns scalar
|
|
|
|
func (d *D) TryFieldScalarBitBufFn(name string, fn func(d *D) (*bitio.Buffer, error), sfns ...ScalarFn) (Scalar, error) {
|
|
|
|
return d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// FieldScalarBitBufFn tries to add a field, calls *bitio.Buffer decode function and returns scalar
|
|
|
|
func (d *D) FieldScalarBitBufFn(name string, fn func(d *D) *bitio.Buffer, sfns ...ScalarFn) Scalar {
|
|
|
|
v, err := d.TryFieldScalarBitBufFn(name, func(d *D) (*bitio.Buffer, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "BitBuf", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-05 17:04:26 +03:00
|
|
|
// Type Bool
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// ActualBool asserts actual value is a Bool and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) ActualBool() bool {
|
|
|
|
v, ok := s.Actual.(bool)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Actual %v as bool", s.Actual))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// SymBool asserts symbolic value is a Bool and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) SymBool() bool {
|
|
|
|
v, ok := s.Sym.(bool)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Sym %v as bool", s.Sym))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldBoolScalarFn tries to add a field, calls scalar functions and returns actual value as a Bool
|
|
|
|
func (d *D) TryFieldBoolScalarFn(name string, fn func(d *D) (Scalar, error), sfns ...ScalarFn) (bool, error) {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d) }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
return false, err
|
|
|
|
}
|
|
|
|
return v.ActualBool(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldBoolScalarFn adds a field, calls scalar functions and returns actual value as a Bool
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldBoolScalarFn(name string, fn func(d *D) Scalar, sfns ...ScalarFn) bool {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "Bool", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v.ActualBool()
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// FieldBoolFn adds a field, calls bool decode function and returns actual value as a Bool
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldBoolFn(name string, fn func(d *D) bool, sfns ...ScalarFn) bool {
|
|
|
|
return d.FieldBoolScalarFn(name, func(d *D) Scalar { return Scalar{Actual: fn(d)} }, sfns...)
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// TryFieldBoolFn tries to add a field, calls bool decode function and returns actual value as a Bool
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldBoolFn(name string, fn func(d *D) (bool, error), sfns ...ScalarFn) (bool, error) {
|
|
|
|
return d.TryFieldBoolScalarFn(name, func(d *D) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldScalarBoolFn tries to add a field, calls bool decode function and returns scalar
|
|
|
|
func (d *D) TryFieldScalarBoolFn(name string, fn func(d *D) (bool, error), sfns ...ScalarFn) (Scalar, error) {
|
|
|
|
return d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// FieldScalarBoolFn tries to add a field, calls bool decode function and returns scalar
|
|
|
|
func (d *D) FieldScalarBoolFn(name string, fn func(d *D) bool, sfns ...ScalarFn) Scalar {
|
|
|
|
v, err := d.TryFieldScalarBoolFn(name, func(d *D) (bool, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "Bool", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-05 17:04:26 +03:00
|
|
|
// Type F
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// ActualF asserts actual value is a F and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) ActualF() float64 {
|
|
|
|
v, ok := s.Actual.(float64)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Actual %v as float64", s.Actual))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// SymF asserts symbolic value is a F and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) SymF() float64 {
|
|
|
|
v, ok := s.Sym.(float64)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Sym %v as float64", s.Sym))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldFScalarFn tries to add a field, calls scalar functions and returns actual value as a F
|
|
|
|
func (d *D) TryFieldFScalarFn(name string, fn func(d *D) (Scalar, error), sfns ...ScalarFn) (float64, error) {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d) }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualF(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFScalarFn adds a field, calls scalar functions and returns actual value as a F
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldFScalarFn(name string, fn func(d *D) Scalar, sfns ...ScalarFn) float64 {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "F", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v.ActualF()
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// FieldFFn adds a field, calls float64 decode function and returns actual value as a F
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldFFn(name string, fn func(d *D) float64, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFScalarFn(name, func(d *D) Scalar { return Scalar{Actual: fn(d)} }, sfns...)
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// TryFieldFFn tries to add a field, calls float64 decode function and returns actual value as a F
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldFFn(name string, fn func(d *D) (float64, error), sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFScalarFn(name, func(d *D) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldScalarFFn tries to add a field, calls float64 decode function and returns scalar
|
|
|
|
func (d *D) TryFieldScalarFFn(name string, fn func(d *D) (float64, error), sfns ...ScalarFn) (Scalar, error) {
|
|
|
|
return d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// FieldScalarFFn tries to add a field, calls float64 decode function and returns scalar
|
|
|
|
func (d *D) FieldScalarFFn(name string, fn func(d *D) float64, sfns ...ScalarFn) Scalar {
|
|
|
|
v, err := d.TryFieldScalarFFn(name, func(d *D) (float64, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "F", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-05 17:04:26 +03:00
|
|
|
// Type S
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// ActualS asserts actual value is a S and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) ActualS() int64 {
|
|
|
|
v, ok := s.Actual.(int64)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Actual %v as int64", s.Actual))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// SymS asserts symbolic value is a S and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) SymS() int64 {
|
|
|
|
v, ok := s.Sym.(int64)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Sym %v as int64", s.Sym))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldSScalarFn tries to add a field, calls scalar functions and returns actual value as a S
|
|
|
|
func (d *D) TryFieldSScalarFn(name string, fn func(d *D) (Scalar, error), sfns ...ScalarFn) (int64, error) {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d) }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualS(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldSScalarFn adds a field, calls scalar functions and returns actual value as a S
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldSScalarFn(name string, fn func(d *D) Scalar, sfns ...ScalarFn) int64 {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "S", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v.ActualS()
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// FieldSFn adds a field, calls int64 decode function and returns actual value as a S
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldSFn(name string, fn func(d *D) int64, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSScalarFn(name, func(d *D) Scalar { return Scalar{Actual: fn(d)} }, sfns...)
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// TryFieldSFn tries to add a field, calls int64 decode function and returns actual value as a S
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldSFn(name string, fn func(d *D) (int64, error), sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSScalarFn(name, func(d *D) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldScalarSFn tries to add a field, calls int64 decode function and returns scalar
|
|
|
|
func (d *D) TryFieldScalarSFn(name string, fn func(d *D) (int64, error), sfns ...ScalarFn) (Scalar, error) {
|
|
|
|
return d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// FieldScalarSFn tries to add a field, calls int64 decode function and returns scalar
|
|
|
|
func (d *D) FieldScalarSFn(name string, fn func(d *D) int64, sfns ...ScalarFn) Scalar {
|
|
|
|
v, err := d.TryFieldScalarSFn(name, func(d *D) (int64, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "S", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-05 17:04:26 +03:00
|
|
|
// Type Str
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// ActualStr asserts actual value is a Str and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) ActualStr() string {
|
|
|
|
v, ok := s.Actual.(string)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Actual %v as string", s.Actual))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// SymStr asserts symbolic value is a Str and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) SymStr() string {
|
|
|
|
v, ok := s.Sym.(string)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Sym %v as string", s.Sym))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldStrScalarFn tries to add a field, calls scalar functions and returns actual value as a Str
|
|
|
|
func (d *D) TryFieldStrScalarFn(name string, fn func(d *D) (Scalar, error), sfns ...ScalarFn) (string, error) {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d) }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
return "", err
|
|
|
|
}
|
|
|
|
return v.ActualStr(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldStrScalarFn adds a field, calls scalar functions and returns actual value as a Str
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldStrScalarFn(name string, fn func(d *D) Scalar, sfns ...ScalarFn) string {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "Str", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v.ActualStr()
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// FieldStrFn adds a field, calls string decode function and returns actual value as a Str
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldStrFn(name string, fn func(d *D) string, sfns ...ScalarFn) string {
|
|
|
|
return d.FieldStrScalarFn(name, func(d *D) Scalar { return Scalar{Actual: fn(d)} }, sfns...)
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// TryFieldStrFn tries to add a field, calls string decode function and returns actual value as a Str
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldStrFn(name string, fn func(d *D) (string, error), sfns ...ScalarFn) (string, error) {
|
|
|
|
return d.TryFieldStrScalarFn(name, func(d *D) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldScalarStrFn tries to add a field, calls string decode function and returns scalar
|
|
|
|
func (d *D) TryFieldScalarStrFn(name string, fn func(d *D) (string, error), sfns ...ScalarFn) (Scalar, error) {
|
|
|
|
return d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// FieldScalarStrFn tries to add a field, calls string decode function and returns scalar
|
|
|
|
func (d *D) FieldScalarStrFn(name string, fn func(d *D) string, sfns ...ScalarFn) Scalar {
|
|
|
|
v, err := d.TryFieldScalarStrFn(name, func(d *D) (string, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "Str", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-05 17:04:26 +03:00
|
|
|
// Type U
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// ActualU asserts actual value is a U and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) ActualU() uint64 {
|
|
|
|
v, ok := s.Actual.(uint64)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Actual %v as uint64", s.Actual))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// SymU asserts symbolic value is a U and returns it
|
2021-11-05 17:04:26 +03:00
|
|
|
func (s Scalar) SymU() uint64 {
|
|
|
|
v, ok := s.Sym.(uint64)
|
|
|
|
if !ok {
|
|
|
|
panic(fmt.Sprintf("failed to type assert s.Sym %v as uint64", s.Sym))
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldUScalarFn tries to add a field, calls scalar functions and returns actual value as a U
|
|
|
|
func (d *D) TryFieldUScalarFn(name string, fn func(d *D) (Scalar, error), sfns ...ScalarFn) (uint64, error) {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d) }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualU(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldUScalarFn adds a field, calls scalar functions and returns actual value as a U
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldUScalarFn(name string, fn func(d *D) Scalar, sfns ...ScalarFn) uint64 {
|
|
|
|
v, err := d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "U", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v.ActualU()
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// FieldUFn adds a field, calls uint64 decode function and returns actual value as a U
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldUFn(name string, fn func(d *D) uint64, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUScalarFn(name, func(d *D) Scalar { return Scalar{Actual: fn(d)} }, sfns...)
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// TryFieldUFn tries to add a field, calls uint64 decode function and returns actual value as a U
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldUFn(name string, fn func(d *D) (uint64, error), sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUScalarFn(name, func(d *D) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-21 15:08:18 +03:00
|
|
|
// TryFieldScalarUFn tries to add a field, calls uint64 decode function and returns scalar
|
|
|
|
func (d *D) TryFieldScalarUFn(name string, fn func(d *D) (uint64, error), sfns ...ScalarFn) (Scalar, error) {
|
|
|
|
return d.TryFieldScalar(name, func(_ Scalar) (Scalar, error) {
|
|
|
|
v, err := fn(d)
|
|
|
|
return Scalar{Actual: v}, err
|
|
|
|
}, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// FieldScalarUFn tries to add a field, calls uint64 decode function and returns scalar
|
|
|
|
func (d *D) FieldScalarUFn(name string, fn func(d *D) uint64, sfns ...ScalarFn) Scalar {
|
|
|
|
v, err := d.TryFieldScalarUFn(name, func(d *D) (uint64, error) { return fn(d), nil }, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "U", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-05 17:04:26 +03:00
|
|
|
// Validate/Assert Bool
|
2021-11-17 18:13:10 +03:00
|
|
|
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) assertBool(assert bool, vs ...bool) func(s Scalar) (Scalar, error) {
|
|
|
|
return func(s Scalar) (Scalar, error) {
|
2021-11-16 15:03:45 +03:00
|
|
|
a := s.ActualBool()
|
2021-11-05 17:04:26 +03:00
|
|
|
for _, b := range vs {
|
|
|
|
if a == b {
|
|
|
|
s.Description = "valid"
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
s.Description = "invalid"
|
2021-11-16 15:03:45 +03:00
|
|
|
if assert && !d.Options.Force {
|
|
|
|
return s, errors.New("failed to assert Bool")
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// AssertBool asserts that actual value is one of given bool values
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) AssertBool(vs ...bool) func(s Scalar) (Scalar, error) {
|
|
|
|
return d.assertBool(true, vs...)
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// ValidateBool validates that actual value is one of given bool values
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) ValidateBool(vs ...bool) func(s Scalar) (Scalar, error) {
|
|
|
|
return d.assertBool(false, vs...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Validate/Assert F
|
2021-11-17 18:13:10 +03:00
|
|
|
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) assertF(assert bool, vs ...float64) func(s Scalar) (Scalar, error) {
|
|
|
|
return func(s Scalar) (Scalar, error) {
|
2021-11-16 15:03:45 +03:00
|
|
|
a := s.ActualF()
|
2021-11-05 17:04:26 +03:00
|
|
|
for _, b := range vs {
|
|
|
|
if a == b {
|
|
|
|
s.Description = "valid"
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
s.Description = "invalid"
|
2021-11-16 15:03:45 +03:00
|
|
|
if assert && !d.Options.Force {
|
|
|
|
return s, errors.New("failed to assert F")
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// AssertF asserts that actual value is one of given float64 values
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) AssertF(vs ...float64) func(s Scalar) (Scalar, error) {
|
|
|
|
return d.assertF(true, vs...)
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// ValidateF validates that actual value is one of given float64 values
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) ValidateF(vs ...float64) func(s Scalar) (Scalar, error) {
|
|
|
|
return d.assertF(false, vs...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Validate/Assert S
|
2021-11-17 18:13:10 +03:00
|
|
|
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) assertS(assert bool, vs ...int64) func(s Scalar) (Scalar, error) {
|
|
|
|
return func(s Scalar) (Scalar, error) {
|
2021-11-16 15:03:45 +03:00
|
|
|
a := s.ActualS()
|
2021-11-05 17:04:26 +03:00
|
|
|
for _, b := range vs {
|
|
|
|
if a == b {
|
|
|
|
s.Description = "valid"
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
s.Description = "invalid"
|
2021-11-16 15:03:45 +03:00
|
|
|
if assert && !d.Options.Force {
|
|
|
|
return s, errors.New("failed to assert S")
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// AssertS asserts that actual value is one of given int64 values
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) AssertS(vs ...int64) func(s Scalar) (Scalar, error) {
|
|
|
|
return d.assertS(true, vs...)
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// ValidateS validates that actual value is one of given int64 values
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) ValidateS(vs ...int64) func(s Scalar) (Scalar, error) {
|
|
|
|
return d.assertS(false, vs...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Validate/Assert Str
|
2021-11-17 18:13:10 +03:00
|
|
|
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) assertStr(assert bool, vs ...string) func(s Scalar) (Scalar, error) {
|
|
|
|
return func(s Scalar) (Scalar, error) {
|
2021-11-16 15:03:45 +03:00
|
|
|
a := s.ActualStr()
|
2021-11-05 17:04:26 +03:00
|
|
|
for _, b := range vs {
|
|
|
|
if a == b {
|
|
|
|
s.Description = "valid"
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
s.Description = "invalid"
|
2021-11-16 15:03:45 +03:00
|
|
|
if assert && !d.Options.Force {
|
|
|
|
return s, errors.New("failed to assert Str")
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// AssertStr asserts that actual value is one of given string values
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) AssertStr(vs ...string) func(s Scalar) (Scalar, error) {
|
|
|
|
return d.assertStr(true, vs...)
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// ValidateStr validates that actual value is one of given string values
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) ValidateStr(vs ...string) func(s Scalar) (Scalar, error) {
|
|
|
|
return d.assertStr(false, vs...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Validate/Assert U
|
2021-11-17 18:13:10 +03:00
|
|
|
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) assertU(assert bool, vs ...uint64) func(s Scalar) (Scalar, error) {
|
|
|
|
return func(s Scalar) (Scalar, error) {
|
2021-11-16 15:03:45 +03:00
|
|
|
a := s.ActualU()
|
2021-11-05 17:04:26 +03:00
|
|
|
for _, b := range vs {
|
|
|
|
if a == b {
|
|
|
|
s.Description = "valid"
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
s.Description = "invalid"
|
2021-11-16 15:03:45 +03:00
|
|
|
if assert && !d.Options.Force {
|
|
|
|
return s, errors.New("failed to assert U")
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// AssertU asserts that actual value is one of given uint64 values
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) AssertU(vs ...uint64) func(s Scalar) (Scalar, error) {
|
|
|
|
return d.assertU(true, vs...)
|
|
|
|
}
|
2021-11-17 18:13:10 +03:00
|
|
|
|
|
|
|
// ValidateU validates that actual value is one of given uint64 values
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) ValidateU(vs ...uint64) func(s Scalar) (Scalar, error) {
|
|
|
|
return d.assertU(false, vs...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Bool -> Scalar
|
|
|
|
|
|
|
|
type BoolToScalar map[bool]Scalar
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapBoolToScalar maps Bool to a Scalar
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) MapBoolToScalar(m BoolToScalar) func(s Scalar) (Scalar, error) {
|
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
a := s.ActualBool()
|
|
|
|
if ns, ok := m[a]; ok {
|
|
|
|
ns.Actual = a
|
|
|
|
s = ns
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Bool -> Bool
|
|
|
|
|
|
|
|
type BoolToBool map[bool]bool
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapBoolToBoolSym maps Bool to a symolic Bool
|
|
|
|
func (d *D) MapBoolToBoolSym(m BoolToBool) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualBool()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Bool -> F
|
|
|
|
|
|
|
|
type BoolToF map[bool]float64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapBoolToFSym maps Bool to a symolic F
|
|
|
|
func (d *D) MapBoolToFSym(m BoolToF) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualBool()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Bool -> S
|
|
|
|
|
|
|
|
type BoolToS map[bool]int64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapBoolToSSym maps Bool to a symolic S
|
|
|
|
func (d *D) MapBoolToSSym(m BoolToS) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualBool()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Bool -> Str
|
|
|
|
|
|
|
|
type BoolToStr map[bool]string
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapBoolToStrSym maps Bool to a symolic Str
|
|
|
|
func (d *D) MapBoolToStrSym(m BoolToStr) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualBool()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Bool -> U
|
|
|
|
|
|
|
|
type BoolToU map[bool]uint64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapBoolToUSym maps Bool to a symolic U
|
|
|
|
func (d *D) MapBoolToUSym(m BoolToU) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualBool()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map S -> Scalar
|
|
|
|
|
|
|
|
type SToScalar map[int64]Scalar
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapSToScalar maps S to a Scalar
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) MapSToScalar(m SToScalar) func(s Scalar) (Scalar, error) {
|
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
a := s.ActualS()
|
|
|
|
if ns, ok := m[a]; ok {
|
|
|
|
ns.Actual = a
|
|
|
|
s = ns
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map S -> Bool
|
|
|
|
|
|
|
|
type SToBool map[int64]bool
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapSToBoolSym maps S to a symolic Bool
|
|
|
|
func (d *D) MapSToBoolSym(m SToBool) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualS()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map S -> F
|
|
|
|
|
|
|
|
type SToF map[int64]float64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapSToFSym maps S to a symolic F
|
|
|
|
func (d *D) MapSToFSym(m SToF) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualS()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map S -> S
|
|
|
|
|
|
|
|
type SToS map[int64]int64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapSToSSym maps S to a symolic S
|
|
|
|
func (d *D) MapSToSSym(m SToS) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualS()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map S -> Str
|
|
|
|
|
|
|
|
type SToStr map[int64]string
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapSToStrSym maps S to a symolic Str
|
|
|
|
func (d *D) MapSToStrSym(m SToStr) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualS()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map S -> U
|
|
|
|
|
|
|
|
type SToU map[int64]uint64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapSToUSym maps S to a symolic U
|
|
|
|
func (d *D) MapSToUSym(m SToU) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualS()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Str -> Scalar
|
|
|
|
|
|
|
|
type StrToScalar map[string]Scalar
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapStrToScalar maps Str to a Scalar
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) MapStrToScalar(m StrToScalar) func(s Scalar) (Scalar, error) {
|
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
a := s.ActualStr()
|
|
|
|
if ns, ok := m[a]; ok {
|
|
|
|
ns.Actual = a
|
|
|
|
s = ns
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Str -> Bool
|
|
|
|
|
|
|
|
type StrToBool map[string]bool
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapStrToBoolSym maps Str to a symolic Bool
|
|
|
|
func (d *D) MapStrToBoolSym(m StrToBool) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualStr()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Str -> F
|
|
|
|
|
|
|
|
type StrToF map[string]float64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapStrToFSym maps Str to a symolic F
|
|
|
|
func (d *D) MapStrToFSym(m StrToF) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualStr()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Str -> S
|
|
|
|
|
|
|
|
type StrToS map[string]int64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapStrToSSym maps Str to a symolic S
|
|
|
|
func (d *D) MapStrToSSym(m StrToS) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualStr()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Str -> Str
|
|
|
|
|
|
|
|
type StrToStr map[string]string
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapStrToStrSym maps Str to a symolic Str
|
|
|
|
func (d *D) MapStrToStrSym(m StrToStr) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualStr()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map Str -> U
|
|
|
|
|
|
|
|
type StrToU map[string]uint64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapStrToUSym maps Str to a symolic U
|
|
|
|
func (d *D) MapStrToUSym(m StrToU) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualStr()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map U -> Scalar
|
|
|
|
|
|
|
|
type UToScalar map[uint64]Scalar
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapUToScalar maps U to a Scalar
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) MapUToScalar(m UToScalar) func(s Scalar) (Scalar, error) {
|
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
a := s.ActualU()
|
|
|
|
if ns, ok := m[a]; ok {
|
|
|
|
ns.Actual = a
|
|
|
|
s = ns
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map U -> Bool
|
|
|
|
|
|
|
|
type UToBool map[uint64]bool
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapUToBoolSym maps U to a symolic Bool
|
|
|
|
func (d *D) MapUToBoolSym(m UToBool) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualU()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map U -> F
|
|
|
|
|
|
|
|
type UToF map[uint64]float64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapUToFSym maps U to a symolic F
|
|
|
|
func (d *D) MapUToFSym(m UToF) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualU()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map U -> S
|
|
|
|
|
|
|
|
type UToS map[uint64]int64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapUToSSym maps U to a symolic S
|
|
|
|
func (d *D) MapUToSSym(m UToS) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualU()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map U -> Str
|
|
|
|
|
|
|
|
type UToStr map[uint64]string
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapUToStrSym maps U to a symolic Str
|
|
|
|
func (d *D) MapUToStrSym(m UToStr) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualU()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Map U -> U
|
|
|
|
|
|
|
|
type UToU map[uint64]uint64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// MapUToUSym maps U to a symolic U
|
|
|
|
func (d *D) MapUToUSym(m UToU) func(s Scalar) (Scalar, error) {
|
2021-11-05 17:04:26 +03:00
|
|
|
return func(s Scalar) (Scalar, error) {
|
|
|
|
if t, ok := m[s.ActualU()]; ok {
|
|
|
|
s.Sym = t
|
|
|
|
}
|
|
|
|
return s, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader RawLen
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryRawLen tries to read nBits raw bits
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryRawLen(nBits int64) (*bitio.Buffer, error) { return d.tryBitBuf(nBits) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// RawLen reads nBits raw bits
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) RawLen(nBits int64) *bitio.Buffer {
|
|
|
|
v, err := d.tryBitBuf(nBits)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "RawLen", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldRawLen tries to add a field and read nBits raw bits
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldRawLen(name string, nBits int64, sfns ...ScalarFn) (*bitio.Buffer, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryBitBuf(nBits)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return v.ActualBitBuf(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldRawLen adds a field and reads nBits raw bits
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldRawLen(name string, nBits int64, sfns ...ScalarFn) *bitio.Buffer {
|
|
|
|
v, err := d.TryFieldRawLen(name, nBits, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "RawLen", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader Bool
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryBool tries to read 1 bit boolean
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryBool() (bool, error) { return d.tryBool() }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Bool reads 1 bit boolean
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) Bool() bool {
|
|
|
|
v, err := d.tryBool()
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "Bool", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldBool tries to add a field and read 1 bit boolean
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldBool(name string, sfns ...ScalarFn) (bool, error) {
|
|
|
|
return d.TryFieldBoolFn(name, (*D).TryBool, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldBool adds a field and reads 1 bit boolean
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldBool(name string, sfns ...ScalarFn) bool {
|
|
|
|
return d.FieldBoolFn(name, (*D).Bool, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Reader U
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU tries to read nBits bits unsigned integer in current endian
|
|
|
|
func (d *D) TryU(nBits int) (uint64, error) { return d.tryUE(nBits, d.Endian) }
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U reads nBits bits unsigned integer in current endian
|
|
|
|
func (d *D) U(nBits int) uint64 {
|
|
|
|
v, err := d.tryUE(nBits, d.Endian)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Op: "U", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU tries to add a field and read nBits bits unsigned integer in current endian
|
|
|
|
func (d *D) TryFieldU(name string, nBits int, sfns ...ScalarFn) (uint64, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryUE(nBits, d.Endian)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualU(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU adds a field and reads nBits bits unsigned integer in current endian
|
|
|
|
func (d *D) FieldU(name string, nBits int, sfns ...ScalarFn) uint64 {
|
|
|
|
v, err := d.TryFieldU(name, nBits, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Name: name, Op: "U", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Reader UE
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryUE tries to read nBits unsigned integer in specified endian
|
|
|
|
func (d *D) TryUE(nBits int, endian Endian) (uint64, error) { return d.tryUE(nBits, endian) }
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// UE reads nBits unsigned integer in specified endian
|
|
|
|
func (d *D) UE(nBits int, endian Endian) uint64 {
|
|
|
|
v, err := d.tryUE(nBits, endian)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Op: "UE", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldUE tries to add a field and read nBits unsigned integer in specified endian
|
|
|
|
func (d *D) TryFieldUE(name string, nBits int, endian Endian, sfns ...ScalarFn) (uint64, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryUE(nBits, endian)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualU(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldUE adds a field and reads nBits unsigned integer in specified endian
|
|
|
|
func (d *D) FieldUE(name string, nBits int, endian Endian, sfns ...ScalarFn) uint64 {
|
|
|
|
v, err := d.TryFieldUE(name, nBits, endian, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Name: name, Op: "UE", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U1
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU1 tries to read 1 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU1() (uint64, error) { return d.tryUE(1, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U1 reads 1 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U1() uint64 {
|
|
|
|
v, err := d.tryUE(1, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U1", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU1 tries to add a field and read 1 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU1(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU1, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU1 adds a field and reads 1 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU1(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U1, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U2
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU2 tries to read 2 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU2() (uint64, error) { return d.tryUE(2, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U2 reads 2 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U2() uint64 {
|
|
|
|
v, err := d.tryUE(2, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U2", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU2 tries to add a field and read 2 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU2(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU2, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU2 adds a field and reads 2 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU2(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U2, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U3
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU3 tries to read 3 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU3() (uint64, error) { return d.tryUE(3, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U3 reads 3 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U3() uint64 {
|
|
|
|
v, err := d.tryUE(3, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U3", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU3 tries to add a field and read 3 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU3(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU3, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU3 adds a field and reads 3 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU3(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U3, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U4
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU4 tries to read 4 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU4() (uint64, error) { return d.tryUE(4, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U4 reads 4 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U4() uint64 {
|
|
|
|
v, err := d.tryUE(4, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U4", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU4 tries to add a field and read 4 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU4(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU4, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU4 adds a field and reads 4 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU4(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U4, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U5
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU5 tries to read 5 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU5() (uint64, error) { return d.tryUE(5, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U5 reads 5 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U5() uint64 {
|
|
|
|
v, err := d.tryUE(5, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U5", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU5 tries to add a field and read 5 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU5(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU5, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU5 adds a field and reads 5 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU5(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U5, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U6
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU6 tries to read 6 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU6() (uint64, error) { return d.tryUE(6, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U6 reads 6 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U6() uint64 {
|
|
|
|
v, err := d.tryUE(6, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U6", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU6 tries to add a field and read 6 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU6(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU6, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU6 adds a field and reads 6 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU6(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U6, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U7
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU7 tries to read 7 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU7() (uint64, error) { return d.tryUE(7, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U7 reads 7 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U7() uint64 {
|
|
|
|
v, err := d.tryUE(7, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U7", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU7 tries to add a field and read 7 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU7(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU7, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU7 adds a field and reads 7 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU7(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U7, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U8
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU8 tries to read 8 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU8() (uint64, error) { return d.tryUE(8, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U8 reads 8 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U8() uint64 {
|
|
|
|
v, err := d.tryUE(8, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U8", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU8 tries to add a field and read 8 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU8(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU8, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU8 adds a field and reads 8 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU8(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U8, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U9
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU9 tries to read 9 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU9() (uint64, error) { return d.tryUE(9, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U9 reads 9 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U9() uint64 {
|
|
|
|
v, err := d.tryUE(9, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U9", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU9 tries to add a field and read 9 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU9(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU9, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU9 adds a field and reads 9 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU9(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U9, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U10
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU10 tries to read 10 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU10() (uint64, error) { return d.tryUE(10, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U10 reads 10 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U10() uint64 {
|
|
|
|
v, err := d.tryUE(10, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U10", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU10 tries to add a field and read 10 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU10(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU10, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU10 adds a field and reads 10 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU10(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U10, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U11
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU11 tries to read 11 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU11() (uint64, error) { return d.tryUE(11, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U11 reads 11 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U11() uint64 {
|
|
|
|
v, err := d.tryUE(11, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U11", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU11 tries to add a field and read 11 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU11(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU11, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU11 adds a field and reads 11 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU11(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U11, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U12
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU12 tries to read 12 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU12() (uint64, error) { return d.tryUE(12, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U12 reads 12 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U12() uint64 {
|
|
|
|
v, err := d.tryUE(12, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U12", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU12 tries to add a field and read 12 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU12(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU12, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU12 adds a field and reads 12 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU12(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U12, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U13
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU13 tries to read 13 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU13() (uint64, error) { return d.tryUE(13, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U13 reads 13 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U13() uint64 {
|
|
|
|
v, err := d.tryUE(13, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U13", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU13 tries to add a field and read 13 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU13(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU13, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU13 adds a field and reads 13 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU13(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U13, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U14
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU14 tries to read 14 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU14() (uint64, error) { return d.tryUE(14, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U14 reads 14 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U14() uint64 {
|
|
|
|
v, err := d.tryUE(14, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U14", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU14 tries to add a field and read 14 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU14(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU14, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU14 adds a field and reads 14 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU14(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U14, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U15
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU15 tries to read 15 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU15() (uint64, error) { return d.tryUE(15, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U15 reads 15 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U15() uint64 {
|
|
|
|
v, err := d.tryUE(15, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U15", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU15 tries to add a field and read 15 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU15(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU15, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU15 adds a field and reads 15 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU15(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U15, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U16
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU16 tries to read 16 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU16() (uint64, error) { return d.tryUE(16, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U16 reads 16 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U16() uint64 {
|
|
|
|
v, err := d.tryUE(16, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U16", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU16 tries to add a field and read 16 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU16(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU16, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU16 adds a field and reads 16 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU16(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U16, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U17
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU17 tries to read 17 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU17() (uint64, error) { return d.tryUE(17, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U17 reads 17 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U17() uint64 {
|
|
|
|
v, err := d.tryUE(17, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U17", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU17 tries to add a field and read 17 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU17(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU17, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU17 adds a field and reads 17 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU17(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U17, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U18
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU18 tries to read 18 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU18() (uint64, error) { return d.tryUE(18, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U18 reads 18 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U18() uint64 {
|
|
|
|
v, err := d.tryUE(18, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U18", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU18 tries to add a field and read 18 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU18(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU18, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU18 adds a field and reads 18 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU18(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U18, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U19
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU19 tries to read 19 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU19() (uint64, error) { return d.tryUE(19, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U19 reads 19 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U19() uint64 {
|
|
|
|
v, err := d.tryUE(19, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U19", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU19 tries to add a field and read 19 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU19(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU19, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU19 adds a field and reads 19 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU19(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U19, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U20
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU20 tries to read 20 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU20() (uint64, error) { return d.tryUE(20, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U20 reads 20 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U20() uint64 {
|
|
|
|
v, err := d.tryUE(20, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U20", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU20 tries to add a field and read 20 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU20(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU20, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU20 adds a field and reads 20 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU20(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U20, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U21
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU21 tries to read 21 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU21() (uint64, error) { return d.tryUE(21, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U21 reads 21 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U21() uint64 {
|
|
|
|
v, err := d.tryUE(21, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U21", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU21 tries to add a field and read 21 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU21(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU21, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU21 adds a field and reads 21 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU21(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U21, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U22
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU22 tries to read 22 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU22() (uint64, error) { return d.tryUE(22, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U22 reads 22 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U22() uint64 {
|
|
|
|
v, err := d.tryUE(22, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U22", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU22 tries to add a field and read 22 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU22(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU22, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU22 adds a field and reads 22 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU22(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U22, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U23
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU23 tries to read 23 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU23() (uint64, error) { return d.tryUE(23, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U23 reads 23 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U23() uint64 {
|
|
|
|
v, err := d.tryUE(23, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U23", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU23 tries to add a field and read 23 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU23(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU23, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU23 adds a field and reads 23 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU23(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U23, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U24
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU24 tries to read 24 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU24() (uint64, error) { return d.tryUE(24, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U24 reads 24 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U24() uint64 {
|
|
|
|
v, err := d.tryUE(24, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U24", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU24 tries to add a field and read 24 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU24(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU24, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU24 adds a field and reads 24 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU24(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U24, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U25
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU25 tries to read 25 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU25() (uint64, error) { return d.tryUE(25, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U25 reads 25 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U25() uint64 {
|
|
|
|
v, err := d.tryUE(25, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U25", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU25 tries to add a field and read 25 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU25(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU25, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU25 adds a field and reads 25 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU25(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U25, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U26
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU26 tries to read 26 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU26() (uint64, error) { return d.tryUE(26, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U26 reads 26 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U26() uint64 {
|
|
|
|
v, err := d.tryUE(26, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U26", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU26 tries to add a field and read 26 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU26(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU26, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU26 adds a field and reads 26 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU26(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U26, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U27
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU27 tries to read 27 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU27() (uint64, error) { return d.tryUE(27, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U27 reads 27 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U27() uint64 {
|
|
|
|
v, err := d.tryUE(27, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U27", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU27 tries to add a field and read 27 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU27(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU27, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU27 adds a field and reads 27 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU27(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U27, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U28
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU28 tries to read 28 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU28() (uint64, error) { return d.tryUE(28, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U28 reads 28 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U28() uint64 {
|
|
|
|
v, err := d.tryUE(28, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U28", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU28 tries to add a field and read 28 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU28(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU28, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU28 adds a field and reads 28 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU28(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U28, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U29
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU29 tries to read 29 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU29() (uint64, error) { return d.tryUE(29, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U29 reads 29 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U29() uint64 {
|
|
|
|
v, err := d.tryUE(29, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U29", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU29 tries to add a field and read 29 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU29(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU29, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU29 adds a field and reads 29 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU29(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U29, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U30
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU30 tries to read 30 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU30() (uint64, error) { return d.tryUE(30, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U30 reads 30 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U30() uint64 {
|
|
|
|
v, err := d.tryUE(30, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U30", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU30 tries to add a field and read 30 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU30(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU30, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU30 adds a field and reads 30 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU30(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U30, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U31
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU31 tries to read 31 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU31() (uint64, error) { return d.tryUE(31, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U31 reads 31 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U31() uint64 {
|
|
|
|
v, err := d.tryUE(31, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U31", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU31 tries to add a field and read 31 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU31(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU31, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU31 adds a field and reads 31 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU31(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U31, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U32
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU32 tries to read 32 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU32() (uint64, error) { return d.tryUE(32, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U32 reads 32 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U32() uint64 {
|
|
|
|
v, err := d.tryUE(32, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U32", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU32 tries to add a field and read 32 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU32(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU32, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU32 adds a field and reads 32 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU32(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U32, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U33
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU33 tries to read 33 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU33() (uint64, error) { return d.tryUE(33, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U33 reads 33 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U33() uint64 {
|
|
|
|
v, err := d.tryUE(33, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U33", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU33 tries to add a field and read 33 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU33(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU33, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU33 adds a field and reads 33 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU33(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U33, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U34
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU34 tries to read 34 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU34() (uint64, error) { return d.tryUE(34, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U34 reads 34 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U34() uint64 {
|
|
|
|
v, err := d.tryUE(34, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U34", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU34 tries to add a field and read 34 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU34(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU34, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU34 adds a field and reads 34 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU34(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U34, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U35
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU35 tries to read 35 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU35() (uint64, error) { return d.tryUE(35, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U35 reads 35 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U35() uint64 {
|
|
|
|
v, err := d.tryUE(35, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U35", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU35 tries to add a field and read 35 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU35(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU35, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU35 adds a field and reads 35 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU35(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U35, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U36
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU36 tries to read 36 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU36() (uint64, error) { return d.tryUE(36, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U36 reads 36 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U36() uint64 {
|
|
|
|
v, err := d.tryUE(36, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U36", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU36 tries to add a field and read 36 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU36(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU36, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU36 adds a field and reads 36 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU36(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U36, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U37
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU37 tries to read 37 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU37() (uint64, error) { return d.tryUE(37, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U37 reads 37 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U37() uint64 {
|
|
|
|
v, err := d.tryUE(37, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U37", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU37 tries to add a field and read 37 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU37(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU37, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU37 adds a field and reads 37 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU37(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U37, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U38
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU38 tries to read 38 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU38() (uint64, error) { return d.tryUE(38, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U38 reads 38 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U38() uint64 {
|
|
|
|
v, err := d.tryUE(38, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U38", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU38 tries to add a field and read 38 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU38(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU38, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU38 adds a field and reads 38 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU38(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U38, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U39
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU39 tries to read 39 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU39() (uint64, error) { return d.tryUE(39, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U39 reads 39 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U39() uint64 {
|
|
|
|
v, err := d.tryUE(39, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U39", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU39 tries to add a field and read 39 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU39(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU39, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU39 adds a field and reads 39 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU39(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U39, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U40
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU40 tries to read 40 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU40() (uint64, error) { return d.tryUE(40, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U40 reads 40 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U40() uint64 {
|
|
|
|
v, err := d.tryUE(40, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U40", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU40 tries to add a field and read 40 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU40(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU40, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU40 adds a field and reads 40 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU40(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U40, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U41
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU41 tries to read 41 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU41() (uint64, error) { return d.tryUE(41, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U41 reads 41 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U41() uint64 {
|
|
|
|
v, err := d.tryUE(41, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U41", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU41 tries to add a field and read 41 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU41(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU41, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU41 adds a field and reads 41 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU41(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U41, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U42
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU42 tries to read 42 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU42() (uint64, error) { return d.tryUE(42, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U42 reads 42 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U42() uint64 {
|
|
|
|
v, err := d.tryUE(42, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U42", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU42 tries to add a field and read 42 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU42(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU42, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU42 adds a field and reads 42 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU42(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U42, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U43
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU43 tries to read 43 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU43() (uint64, error) { return d.tryUE(43, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U43 reads 43 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U43() uint64 {
|
|
|
|
v, err := d.tryUE(43, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U43", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU43 tries to add a field and read 43 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU43(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU43, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU43 adds a field and reads 43 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU43(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U43, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U44
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU44 tries to read 44 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU44() (uint64, error) { return d.tryUE(44, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U44 reads 44 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U44() uint64 {
|
|
|
|
v, err := d.tryUE(44, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U44", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU44 tries to add a field and read 44 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU44(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU44, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU44 adds a field and reads 44 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU44(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U44, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U45
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU45 tries to read 45 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU45() (uint64, error) { return d.tryUE(45, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U45 reads 45 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U45() uint64 {
|
|
|
|
v, err := d.tryUE(45, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U45", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU45 tries to add a field and read 45 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU45(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU45, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU45 adds a field and reads 45 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU45(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U45, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U46
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU46 tries to read 46 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU46() (uint64, error) { return d.tryUE(46, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U46 reads 46 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U46() uint64 {
|
|
|
|
v, err := d.tryUE(46, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U46", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU46 tries to add a field and read 46 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU46(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU46, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU46 adds a field and reads 46 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU46(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U46, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U47
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU47 tries to read 47 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU47() (uint64, error) { return d.tryUE(47, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U47 reads 47 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U47() uint64 {
|
|
|
|
v, err := d.tryUE(47, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U47", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU47 tries to add a field and read 47 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU47(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU47, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU47 adds a field and reads 47 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU47(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U47, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U48
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU48 tries to read 48 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU48() (uint64, error) { return d.tryUE(48, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U48 reads 48 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U48() uint64 {
|
|
|
|
v, err := d.tryUE(48, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U48", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU48 tries to add a field and read 48 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU48(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU48, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU48 adds a field and reads 48 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU48(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U48, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U49
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU49 tries to read 49 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU49() (uint64, error) { return d.tryUE(49, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U49 reads 49 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U49() uint64 {
|
|
|
|
v, err := d.tryUE(49, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U49", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU49 tries to add a field and read 49 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU49(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU49, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU49 adds a field and reads 49 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU49(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U49, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U50
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU50 tries to read 50 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU50() (uint64, error) { return d.tryUE(50, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U50 reads 50 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U50() uint64 {
|
|
|
|
v, err := d.tryUE(50, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U50", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU50 tries to add a field and read 50 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU50(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU50, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU50 adds a field and reads 50 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU50(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U50, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U51
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU51 tries to read 51 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU51() (uint64, error) { return d.tryUE(51, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U51 reads 51 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U51() uint64 {
|
|
|
|
v, err := d.tryUE(51, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U51", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU51 tries to add a field and read 51 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU51(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU51, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU51 adds a field and reads 51 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU51(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U51, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U52
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU52 tries to read 52 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU52() (uint64, error) { return d.tryUE(52, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U52 reads 52 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U52() uint64 {
|
|
|
|
v, err := d.tryUE(52, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U52", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU52 tries to add a field and read 52 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU52(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU52, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU52 adds a field and reads 52 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU52(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U52, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U53
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU53 tries to read 53 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU53() (uint64, error) { return d.tryUE(53, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U53 reads 53 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U53() uint64 {
|
|
|
|
v, err := d.tryUE(53, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U53", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU53 tries to add a field and read 53 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU53(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU53, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU53 adds a field and reads 53 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU53(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U53, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U54
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU54 tries to read 54 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU54() (uint64, error) { return d.tryUE(54, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U54 reads 54 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U54() uint64 {
|
|
|
|
v, err := d.tryUE(54, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U54", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU54 tries to add a field and read 54 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU54(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU54, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU54 adds a field and reads 54 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU54(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U54, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U55
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU55 tries to read 55 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU55() (uint64, error) { return d.tryUE(55, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U55 reads 55 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U55() uint64 {
|
|
|
|
v, err := d.tryUE(55, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U55", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU55 tries to add a field and read 55 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU55(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU55, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU55 adds a field and reads 55 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU55(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U55, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U56
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU56 tries to read 56 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU56() (uint64, error) { return d.tryUE(56, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U56 reads 56 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U56() uint64 {
|
|
|
|
v, err := d.tryUE(56, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U56", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU56 tries to add a field and read 56 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU56(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU56, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU56 adds a field and reads 56 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU56(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U56, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U57
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU57 tries to read 57 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU57() (uint64, error) { return d.tryUE(57, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U57 reads 57 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U57() uint64 {
|
|
|
|
v, err := d.tryUE(57, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U57", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU57 tries to add a field and read 57 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU57(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU57, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU57 adds a field and reads 57 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU57(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U57, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U58
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU58 tries to read 58 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU58() (uint64, error) { return d.tryUE(58, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U58 reads 58 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U58() uint64 {
|
|
|
|
v, err := d.tryUE(58, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U58", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU58 tries to add a field and read 58 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU58(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU58, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU58 adds a field and reads 58 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU58(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U58, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U59
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU59 tries to read 59 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU59() (uint64, error) { return d.tryUE(59, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U59 reads 59 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U59() uint64 {
|
|
|
|
v, err := d.tryUE(59, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U59", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU59 tries to add a field and read 59 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU59(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU59, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU59 adds a field and reads 59 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU59(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U59, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U60
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU60 tries to read 60 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU60() (uint64, error) { return d.tryUE(60, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U60 reads 60 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U60() uint64 {
|
|
|
|
v, err := d.tryUE(60, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U60", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU60 tries to add a field and read 60 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU60(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU60, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU60 adds a field and reads 60 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU60(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U60, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U61
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU61 tries to read 61 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU61() (uint64, error) { return d.tryUE(61, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U61 reads 61 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U61() uint64 {
|
|
|
|
v, err := d.tryUE(61, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U61", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU61 tries to add a field and read 61 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU61(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU61, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU61 adds a field and reads 61 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU61(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U61, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U62
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU62 tries to read 62 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU62() (uint64, error) { return d.tryUE(62, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U62 reads 62 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U62() uint64 {
|
|
|
|
v, err := d.tryUE(62, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U62", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU62 tries to add a field and read 62 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU62(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU62, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU62 adds a field and reads 62 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU62(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U62, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U63
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU63 tries to read 63 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU63() (uint64, error) { return d.tryUE(63, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U63 reads 63 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U63() uint64 {
|
|
|
|
v, err := d.tryUE(63, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U63", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU63 tries to add a field and read 63 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU63(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU63, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU63 adds a field and reads 63 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU63(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U63, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU64 tries to read 64 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU64() (uint64, error) { return d.tryUE(64, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U64 reads 64 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U64() uint64 {
|
|
|
|
v, err := d.tryUE(64, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U64", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU64 tries to add a field and read 64 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU64(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU64, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU64 adds a field and reads 64 bit unsigned integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU64(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U64, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U8LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU8LE tries to read 8 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU8LE() (uint64, error) { return d.tryUE(8, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U8LE reads 8 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U8LE() uint64 {
|
|
|
|
v, err := d.tryUE(8, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U8LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU8LE tries to add a field and read 8 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU8LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU8LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU8LE adds a field and reads 8 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU8LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U8LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U9LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU9LE tries to read 9 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU9LE() (uint64, error) { return d.tryUE(9, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U9LE reads 9 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U9LE() uint64 {
|
|
|
|
v, err := d.tryUE(9, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U9LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU9LE tries to add a field and read 9 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU9LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU9LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU9LE adds a field and reads 9 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU9LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U9LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U10LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU10LE tries to read 10 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU10LE() (uint64, error) { return d.tryUE(10, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U10LE reads 10 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U10LE() uint64 {
|
|
|
|
v, err := d.tryUE(10, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U10LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU10LE tries to add a field and read 10 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU10LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU10LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU10LE adds a field and reads 10 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU10LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U10LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U11LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU11LE tries to read 11 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU11LE() (uint64, error) { return d.tryUE(11, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U11LE reads 11 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U11LE() uint64 {
|
|
|
|
v, err := d.tryUE(11, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U11LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU11LE tries to add a field and read 11 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU11LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU11LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU11LE adds a field and reads 11 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU11LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U11LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U12LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU12LE tries to read 12 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU12LE() (uint64, error) { return d.tryUE(12, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U12LE reads 12 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U12LE() uint64 {
|
|
|
|
v, err := d.tryUE(12, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U12LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU12LE tries to add a field and read 12 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU12LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU12LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU12LE adds a field and reads 12 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU12LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U12LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U13LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU13LE tries to read 13 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU13LE() (uint64, error) { return d.tryUE(13, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U13LE reads 13 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U13LE() uint64 {
|
|
|
|
v, err := d.tryUE(13, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U13LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU13LE tries to add a field and read 13 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU13LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU13LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU13LE adds a field and reads 13 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU13LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U13LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U14LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU14LE tries to read 14 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU14LE() (uint64, error) { return d.tryUE(14, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U14LE reads 14 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U14LE() uint64 {
|
|
|
|
v, err := d.tryUE(14, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U14LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU14LE tries to add a field and read 14 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU14LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU14LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU14LE adds a field and reads 14 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU14LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U14LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U15LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU15LE tries to read 15 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU15LE() (uint64, error) { return d.tryUE(15, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U15LE reads 15 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U15LE() uint64 {
|
|
|
|
v, err := d.tryUE(15, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U15LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU15LE tries to add a field and read 15 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU15LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU15LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU15LE adds a field and reads 15 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU15LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U15LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U16LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU16LE tries to read 16 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU16LE() (uint64, error) { return d.tryUE(16, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U16LE reads 16 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U16LE() uint64 {
|
|
|
|
v, err := d.tryUE(16, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U16LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU16LE tries to add a field and read 16 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU16LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU16LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU16LE adds a field and reads 16 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU16LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U16LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U17LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU17LE tries to read 17 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU17LE() (uint64, error) { return d.tryUE(17, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U17LE reads 17 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U17LE() uint64 {
|
|
|
|
v, err := d.tryUE(17, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U17LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU17LE tries to add a field and read 17 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU17LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU17LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU17LE adds a field and reads 17 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU17LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U17LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U18LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU18LE tries to read 18 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU18LE() (uint64, error) { return d.tryUE(18, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U18LE reads 18 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U18LE() uint64 {
|
|
|
|
v, err := d.tryUE(18, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U18LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU18LE tries to add a field and read 18 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU18LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU18LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU18LE adds a field and reads 18 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU18LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U18LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U19LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU19LE tries to read 19 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU19LE() (uint64, error) { return d.tryUE(19, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U19LE reads 19 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U19LE() uint64 {
|
|
|
|
v, err := d.tryUE(19, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U19LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU19LE tries to add a field and read 19 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU19LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU19LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU19LE adds a field and reads 19 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU19LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U19LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U20LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU20LE tries to read 20 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU20LE() (uint64, error) { return d.tryUE(20, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U20LE reads 20 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U20LE() uint64 {
|
|
|
|
v, err := d.tryUE(20, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U20LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU20LE tries to add a field and read 20 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU20LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU20LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU20LE adds a field and reads 20 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU20LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U20LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U21LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU21LE tries to read 21 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU21LE() (uint64, error) { return d.tryUE(21, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U21LE reads 21 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U21LE() uint64 {
|
|
|
|
v, err := d.tryUE(21, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U21LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU21LE tries to add a field and read 21 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU21LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU21LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU21LE adds a field and reads 21 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU21LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U21LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U22LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU22LE tries to read 22 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU22LE() (uint64, error) { return d.tryUE(22, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U22LE reads 22 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U22LE() uint64 {
|
|
|
|
v, err := d.tryUE(22, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U22LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU22LE tries to add a field and read 22 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU22LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU22LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU22LE adds a field and reads 22 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU22LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U22LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U23LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU23LE tries to read 23 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU23LE() (uint64, error) { return d.tryUE(23, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U23LE reads 23 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U23LE() uint64 {
|
|
|
|
v, err := d.tryUE(23, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U23LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU23LE tries to add a field and read 23 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU23LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU23LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU23LE adds a field and reads 23 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU23LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U23LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U24LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU24LE tries to read 24 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU24LE() (uint64, error) { return d.tryUE(24, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U24LE reads 24 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U24LE() uint64 {
|
|
|
|
v, err := d.tryUE(24, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U24LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU24LE tries to add a field and read 24 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU24LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU24LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU24LE adds a field and reads 24 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU24LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U24LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U25LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU25LE tries to read 25 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU25LE() (uint64, error) { return d.tryUE(25, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U25LE reads 25 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U25LE() uint64 {
|
|
|
|
v, err := d.tryUE(25, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U25LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU25LE tries to add a field and read 25 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU25LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU25LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU25LE adds a field and reads 25 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU25LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U25LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U26LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU26LE tries to read 26 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU26LE() (uint64, error) { return d.tryUE(26, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U26LE reads 26 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U26LE() uint64 {
|
|
|
|
v, err := d.tryUE(26, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U26LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU26LE tries to add a field and read 26 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU26LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU26LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU26LE adds a field and reads 26 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU26LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U26LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U27LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU27LE tries to read 27 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU27LE() (uint64, error) { return d.tryUE(27, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U27LE reads 27 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U27LE() uint64 {
|
|
|
|
v, err := d.tryUE(27, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U27LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU27LE tries to add a field and read 27 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU27LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU27LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU27LE adds a field and reads 27 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU27LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U27LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U28LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU28LE tries to read 28 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU28LE() (uint64, error) { return d.tryUE(28, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U28LE reads 28 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U28LE() uint64 {
|
|
|
|
v, err := d.tryUE(28, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U28LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU28LE tries to add a field and read 28 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU28LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU28LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU28LE adds a field and reads 28 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU28LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U28LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U29LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU29LE tries to read 29 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU29LE() (uint64, error) { return d.tryUE(29, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U29LE reads 29 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U29LE() uint64 {
|
|
|
|
v, err := d.tryUE(29, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U29LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU29LE tries to add a field and read 29 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU29LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU29LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU29LE adds a field and reads 29 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU29LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U29LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U30LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU30LE tries to read 30 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU30LE() (uint64, error) { return d.tryUE(30, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U30LE reads 30 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U30LE() uint64 {
|
|
|
|
v, err := d.tryUE(30, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U30LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU30LE tries to add a field and read 30 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU30LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU30LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU30LE adds a field and reads 30 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU30LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U30LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U31LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU31LE tries to read 31 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU31LE() (uint64, error) { return d.tryUE(31, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U31LE reads 31 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U31LE() uint64 {
|
|
|
|
v, err := d.tryUE(31, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U31LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU31LE tries to add a field and read 31 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU31LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU31LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU31LE adds a field and reads 31 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU31LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U31LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U32LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU32LE tries to read 32 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU32LE() (uint64, error) { return d.tryUE(32, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U32LE reads 32 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U32LE() uint64 {
|
|
|
|
v, err := d.tryUE(32, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U32LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU32LE tries to add a field and read 32 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU32LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU32LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU32LE adds a field and reads 32 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU32LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U32LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U33LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU33LE tries to read 33 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU33LE() (uint64, error) { return d.tryUE(33, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U33LE reads 33 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U33LE() uint64 {
|
|
|
|
v, err := d.tryUE(33, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U33LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU33LE tries to add a field and read 33 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU33LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU33LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU33LE adds a field and reads 33 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU33LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U33LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U34LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU34LE tries to read 34 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU34LE() (uint64, error) { return d.tryUE(34, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U34LE reads 34 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U34LE() uint64 {
|
|
|
|
v, err := d.tryUE(34, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U34LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU34LE tries to add a field and read 34 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU34LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU34LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU34LE adds a field and reads 34 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU34LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U34LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U35LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU35LE tries to read 35 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU35LE() (uint64, error) { return d.tryUE(35, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U35LE reads 35 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U35LE() uint64 {
|
|
|
|
v, err := d.tryUE(35, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U35LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU35LE tries to add a field and read 35 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU35LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU35LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU35LE adds a field and reads 35 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU35LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U35LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U36LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU36LE tries to read 36 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU36LE() (uint64, error) { return d.tryUE(36, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U36LE reads 36 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U36LE() uint64 {
|
|
|
|
v, err := d.tryUE(36, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U36LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU36LE tries to add a field and read 36 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU36LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU36LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU36LE adds a field and reads 36 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU36LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U36LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U37LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU37LE tries to read 37 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU37LE() (uint64, error) { return d.tryUE(37, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U37LE reads 37 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U37LE() uint64 {
|
|
|
|
v, err := d.tryUE(37, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U37LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU37LE tries to add a field and read 37 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU37LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU37LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU37LE adds a field and reads 37 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU37LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U37LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U38LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU38LE tries to read 38 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU38LE() (uint64, error) { return d.tryUE(38, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U38LE reads 38 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U38LE() uint64 {
|
|
|
|
v, err := d.tryUE(38, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U38LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU38LE tries to add a field and read 38 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU38LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU38LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU38LE adds a field and reads 38 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU38LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U38LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U39LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU39LE tries to read 39 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU39LE() (uint64, error) { return d.tryUE(39, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U39LE reads 39 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U39LE() uint64 {
|
|
|
|
v, err := d.tryUE(39, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U39LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU39LE tries to add a field and read 39 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU39LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU39LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU39LE adds a field and reads 39 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU39LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U39LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U40LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU40LE tries to read 40 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU40LE() (uint64, error) { return d.tryUE(40, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U40LE reads 40 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U40LE() uint64 {
|
|
|
|
v, err := d.tryUE(40, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U40LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU40LE tries to add a field and read 40 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU40LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU40LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU40LE adds a field and reads 40 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU40LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U40LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U41LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU41LE tries to read 41 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU41LE() (uint64, error) { return d.tryUE(41, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U41LE reads 41 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U41LE() uint64 {
|
|
|
|
v, err := d.tryUE(41, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U41LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU41LE tries to add a field and read 41 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU41LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU41LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU41LE adds a field and reads 41 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU41LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U41LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U42LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU42LE tries to read 42 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU42LE() (uint64, error) { return d.tryUE(42, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U42LE reads 42 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U42LE() uint64 {
|
|
|
|
v, err := d.tryUE(42, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U42LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU42LE tries to add a field and read 42 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU42LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU42LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU42LE adds a field and reads 42 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU42LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U42LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U43LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU43LE tries to read 43 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU43LE() (uint64, error) { return d.tryUE(43, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U43LE reads 43 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U43LE() uint64 {
|
|
|
|
v, err := d.tryUE(43, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U43LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU43LE tries to add a field and read 43 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU43LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU43LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU43LE adds a field and reads 43 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU43LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U43LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U44LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU44LE tries to read 44 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU44LE() (uint64, error) { return d.tryUE(44, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U44LE reads 44 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U44LE() uint64 {
|
|
|
|
v, err := d.tryUE(44, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U44LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU44LE tries to add a field and read 44 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU44LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU44LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU44LE adds a field and reads 44 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU44LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U44LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U45LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU45LE tries to read 45 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU45LE() (uint64, error) { return d.tryUE(45, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U45LE reads 45 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U45LE() uint64 {
|
|
|
|
v, err := d.tryUE(45, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U45LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU45LE tries to add a field and read 45 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU45LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU45LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU45LE adds a field and reads 45 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU45LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U45LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U46LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU46LE tries to read 46 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU46LE() (uint64, error) { return d.tryUE(46, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U46LE reads 46 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U46LE() uint64 {
|
|
|
|
v, err := d.tryUE(46, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U46LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU46LE tries to add a field and read 46 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU46LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU46LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU46LE adds a field and reads 46 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU46LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U46LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U47LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU47LE tries to read 47 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU47LE() (uint64, error) { return d.tryUE(47, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U47LE reads 47 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U47LE() uint64 {
|
|
|
|
v, err := d.tryUE(47, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U47LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU47LE tries to add a field and read 47 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU47LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU47LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU47LE adds a field and reads 47 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU47LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U47LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U48LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU48LE tries to read 48 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU48LE() (uint64, error) { return d.tryUE(48, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U48LE reads 48 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U48LE() uint64 {
|
|
|
|
v, err := d.tryUE(48, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U48LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU48LE tries to add a field and read 48 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU48LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU48LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU48LE adds a field and reads 48 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU48LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U48LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U49LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU49LE tries to read 49 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU49LE() (uint64, error) { return d.tryUE(49, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U49LE reads 49 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U49LE() uint64 {
|
|
|
|
v, err := d.tryUE(49, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U49LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU49LE tries to add a field and read 49 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU49LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU49LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU49LE adds a field and reads 49 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU49LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U49LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U50LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU50LE tries to read 50 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU50LE() (uint64, error) { return d.tryUE(50, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U50LE reads 50 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U50LE() uint64 {
|
|
|
|
v, err := d.tryUE(50, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U50LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU50LE tries to add a field and read 50 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU50LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU50LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU50LE adds a field and reads 50 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU50LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U50LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U51LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU51LE tries to read 51 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU51LE() (uint64, error) { return d.tryUE(51, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U51LE reads 51 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U51LE() uint64 {
|
|
|
|
v, err := d.tryUE(51, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U51LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU51LE tries to add a field and read 51 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU51LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU51LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU51LE adds a field and reads 51 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU51LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U51LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U52LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU52LE tries to read 52 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU52LE() (uint64, error) { return d.tryUE(52, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U52LE reads 52 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U52LE() uint64 {
|
|
|
|
v, err := d.tryUE(52, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U52LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU52LE tries to add a field and read 52 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU52LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU52LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU52LE adds a field and reads 52 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU52LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U52LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U53LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU53LE tries to read 53 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU53LE() (uint64, error) { return d.tryUE(53, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U53LE reads 53 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U53LE() uint64 {
|
|
|
|
v, err := d.tryUE(53, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U53LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU53LE tries to add a field and read 53 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU53LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU53LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU53LE adds a field and reads 53 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU53LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U53LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U54LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU54LE tries to read 54 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU54LE() (uint64, error) { return d.tryUE(54, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U54LE reads 54 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U54LE() uint64 {
|
|
|
|
v, err := d.tryUE(54, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U54LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU54LE tries to add a field and read 54 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU54LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU54LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU54LE adds a field and reads 54 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU54LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U54LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U55LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU55LE tries to read 55 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU55LE() (uint64, error) { return d.tryUE(55, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U55LE reads 55 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U55LE() uint64 {
|
|
|
|
v, err := d.tryUE(55, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U55LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU55LE tries to add a field and read 55 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU55LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU55LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU55LE adds a field and reads 55 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU55LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U55LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U56LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU56LE tries to read 56 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU56LE() (uint64, error) { return d.tryUE(56, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U56LE reads 56 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U56LE() uint64 {
|
|
|
|
v, err := d.tryUE(56, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U56LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU56LE tries to add a field and read 56 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU56LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU56LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU56LE adds a field and reads 56 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU56LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U56LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U57LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU57LE tries to read 57 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU57LE() (uint64, error) { return d.tryUE(57, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U57LE reads 57 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U57LE() uint64 {
|
|
|
|
v, err := d.tryUE(57, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U57LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU57LE tries to add a field and read 57 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU57LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU57LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU57LE adds a field and reads 57 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU57LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U57LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U58LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU58LE tries to read 58 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU58LE() (uint64, error) { return d.tryUE(58, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U58LE reads 58 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U58LE() uint64 {
|
|
|
|
v, err := d.tryUE(58, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U58LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU58LE tries to add a field and read 58 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU58LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU58LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU58LE adds a field and reads 58 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU58LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U58LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U59LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU59LE tries to read 59 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU59LE() (uint64, error) { return d.tryUE(59, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U59LE reads 59 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U59LE() uint64 {
|
|
|
|
v, err := d.tryUE(59, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U59LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU59LE tries to add a field and read 59 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU59LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU59LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU59LE adds a field and reads 59 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU59LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U59LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U60LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU60LE tries to read 60 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU60LE() (uint64, error) { return d.tryUE(60, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U60LE reads 60 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U60LE() uint64 {
|
|
|
|
v, err := d.tryUE(60, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U60LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU60LE tries to add a field and read 60 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU60LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU60LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU60LE adds a field and reads 60 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU60LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U60LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U61LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU61LE tries to read 61 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU61LE() (uint64, error) { return d.tryUE(61, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U61LE reads 61 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U61LE() uint64 {
|
|
|
|
v, err := d.tryUE(61, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U61LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU61LE tries to add a field and read 61 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU61LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU61LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU61LE adds a field and reads 61 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU61LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U61LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U62LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU62LE tries to read 62 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU62LE() (uint64, error) { return d.tryUE(62, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U62LE reads 62 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U62LE() uint64 {
|
|
|
|
v, err := d.tryUE(62, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U62LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU62LE tries to add a field and read 62 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU62LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU62LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU62LE adds a field and reads 62 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU62LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U62LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U63LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU63LE tries to read 63 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU63LE() (uint64, error) { return d.tryUE(63, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U63LE reads 63 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U63LE() uint64 {
|
|
|
|
v, err := d.tryUE(63, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U63LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU63LE tries to add a field and read 63 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU63LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU63LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU63LE adds a field and reads 63 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU63LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U63LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U64LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU64LE tries to read 64 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU64LE() (uint64, error) { return d.tryUE(64, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U64LE reads 64 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U64LE() uint64 {
|
|
|
|
v, err := d.tryUE(64, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U64LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU64LE tries to add a field and read 64 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU64LE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU64LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU64LE adds a field and reads 64 bit unsigned integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU64LE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U64LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U8BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU8BE tries to read 8 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU8BE() (uint64, error) { return d.tryUE(8, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U8BE reads 8 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U8BE() uint64 {
|
|
|
|
v, err := d.tryUE(8, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U8BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU8BE tries to add a field and read 8 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU8BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU8BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU8BE adds a field and reads 8 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU8BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U8BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U9BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU9BE tries to read 9 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU9BE() (uint64, error) { return d.tryUE(9, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U9BE reads 9 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U9BE() uint64 {
|
|
|
|
v, err := d.tryUE(9, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U9BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU9BE tries to add a field and read 9 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU9BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU9BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU9BE adds a field and reads 9 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU9BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U9BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U10BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU10BE tries to read 10 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU10BE() (uint64, error) { return d.tryUE(10, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U10BE reads 10 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U10BE() uint64 {
|
|
|
|
v, err := d.tryUE(10, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U10BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU10BE tries to add a field and read 10 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU10BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU10BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU10BE adds a field and reads 10 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU10BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U10BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U11BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU11BE tries to read 11 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU11BE() (uint64, error) { return d.tryUE(11, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U11BE reads 11 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U11BE() uint64 {
|
|
|
|
v, err := d.tryUE(11, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U11BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU11BE tries to add a field and read 11 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU11BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU11BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU11BE adds a field and reads 11 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU11BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U11BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U12BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU12BE tries to read 12 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU12BE() (uint64, error) { return d.tryUE(12, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U12BE reads 12 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U12BE() uint64 {
|
|
|
|
v, err := d.tryUE(12, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U12BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU12BE tries to add a field and read 12 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU12BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU12BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU12BE adds a field and reads 12 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU12BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U12BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U13BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU13BE tries to read 13 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU13BE() (uint64, error) { return d.tryUE(13, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U13BE reads 13 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U13BE() uint64 {
|
|
|
|
v, err := d.tryUE(13, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U13BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU13BE tries to add a field and read 13 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU13BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU13BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU13BE adds a field and reads 13 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU13BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U13BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U14BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU14BE tries to read 14 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU14BE() (uint64, error) { return d.tryUE(14, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U14BE reads 14 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U14BE() uint64 {
|
|
|
|
v, err := d.tryUE(14, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U14BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU14BE tries to add a field and read 14 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU14BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU14BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU14BE adds a field and reads 14 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU14BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U14BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U15BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU15BE tries to read 15 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU15BE() (uint64, error) { return d.tryUE(15, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U15BE reads 15 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U15BE() uint64 {
|
|
|
|
v, err := d.tryUE(15, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U15BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU15BE tries to add a field and read 15 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU15BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU15BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU15BE adds a field and reads 15 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU15BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U15BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U16BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU16BE tries to read 16 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU16BE() (uint64, error) { return d.tryUE(16, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U16BE reads 16 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U16BE() uint64 {
|
|
|
|
v, err := d.tryUE(16, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U16BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU16BE tries to add a field and read 16 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU16BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU16BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU16BE adds a field and reads 16 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU16BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U16BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U17BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU17BE tries to read 17 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU17BE() (uint64, error) { return d.tryUE(17, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U17BE reads 17 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U17BE() uint64 {
|
|
|
|
v, err := d.tryUE(17, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U17BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU17BE tries to add a field and read 17 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU17BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU17BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU17BE adds a field and reads 17 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU17BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U17BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U18BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU18BE tries to read 18 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU18BE() (uint64, error) { return d.tryUE(18, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U18BE reads 18 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U18BE() uint64 {
|
|
|
|
v, err := d.tryUE(18, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U18BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU18BE tries to add a field and read 18 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU18BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU18BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU18BE adds a field and reads 18 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU18BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U18BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U19BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU19BE tries to read 19 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU19BE() (uint64, error) { return d.tryUE(19, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U19BE reads 19 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U19BE() uint64 {
|
|
|
|
v, err := d.tryUE(19, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U19BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU19BE tries to add a field and read 19 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU19BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU19BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU19BE adds a field and reads 19 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU19BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U19BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U20BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU20BE tries to read 20 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU20BE() (uint64, error) { return d.tryUE(20, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U20BE reads 20 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U20BE() uint64 {
|
|
|
|
v, err := d.tryUE(20, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U20BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU20BE tries to add a field and read 20 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU20BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU20BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU20BE adds a field and reads 20 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU20BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U20BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U21BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU21BE tries to read 21 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU21BE() (uint64, error) { return d.tryUE(21, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U21BE reads 21 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U21BE() uint64 {
|
|
|
|
v, err := d.tryUE(21, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U21BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU21BE tries to add a field and read 21 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU21BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU21BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU21BE adds a field and reads 21 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU21BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U21BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U22BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU22BE tries to read 22 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU22BE() (uint64, error) { return d.tryUE(22, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U22BE reads 22 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U22BE() uint64 {
|
|
|
|
v, err := d.tryUE(22, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U22BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU22BE tries to add a field and read 22 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU22BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU22BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU22BE adds a field and reads 22 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU22BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U22BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U23BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU23BE tries to read 23 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU23BE() (uint64, error) { return d.tryUE(23, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U23BE reads 23 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U23BE() uint64 {
|
|
|
|
v, err := d.tryUE(23, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U23BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU23BE tries to add a field and read 23 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU23BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU23BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU23BE adds a field and reads 23 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU23BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U23BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U24BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU24BE tries to read 24 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU24BE() (uint64, error) { return d.tryUE(24, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U24BE reads 24 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U24BE() uint64 {
|
|
|
|
v, err := d.tryUE(24, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U24BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU24BE tries to add a field and read 24 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU24BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU24BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU24BE adds a field and reads 24 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU24BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U24BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U25BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU25BE tries to read 25 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU25BE() (uint64, error) { return d.tryUE(25, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U25BE reads 25 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U25BE() uint64 {
|
|
|
|
v, err := d.tryUE(25, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U25BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU25BE tries to add a field and read 25 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU25BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU25BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU25BE adds a field and reads 25 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU25BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U25BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U26BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU26BE tries to read 26 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU26BE() (uint64, error) { return d.tryUE(26, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U26BE reads 26 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U26BE() uint64 {
|
|
|
|
v, err := d.tryUE(26, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U26BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU26BE tries to add a field and read 26 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU26BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU26BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU26BE adds a field and reads 26 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU26BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U26BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U27BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU27BE tries to read 27 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU27BE() (uint64, error) { return d.tryUE(27, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U27BE reads 27 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U27BE() uint64 {
|
|
|
|
v, err := d.tryUE(27, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U27BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU27BE tries to add a field and read 27 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU27BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU27BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU27BE adds a field and reads 27 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU27BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U27BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U28BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU28BE tries to read 28 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU28BE() (uint64, error) { return d.tryUE(28, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U28BE reads 28 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U28BE() uint64 {
|
|
|
|
v, err := d.tryUE(28, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U28BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU28BE tries to add a field and read 28 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU28BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU28BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU28BE adds a field and reads 28 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU28BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U28BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U29BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU29BE tries to read 29 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU29BE() (uint64, error) { return d.tryUE(29, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U29BE reads 29 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U29BE() uint64 {
|
|
|
|
v, err := d.tryUE(29, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U29BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU29BE tries to add a field and read 29 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU29BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU29BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU29BE adds a field and reads 29 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU29BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U29BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U30BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU30BE tries to read 30 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU30BE() (uint64, error) { return d.tryUE(30, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U30BE reads 30 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U30BE() uint64 {
|
|
|
|
v, err := d.tryUE(30, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U30BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU30BE tries to add a field and read 30 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU30BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU30BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU30BE adds a field and reads 30 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU30BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U30BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U31BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU31BE tries to read 31 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU31BE() (uint64, error) { return d.tryUE(31, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U31BE reads 31 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U31BE() uint64 {
|
|
|
|
v, err := d.tryUE(31, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U31BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU31BE tries to add a field and read 31 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU31BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU31BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU31BE adds a field and reads 31 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU31BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U31BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U32BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU32BE tries to read 32 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU32BE() (uint64, error) { return d.tryUE(32, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U32BE reads 32 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U32BE() uint64 {
|
|
|
|
v, err := d.tryUE(32, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U32BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU32BE tries to add a field and read 32 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU32BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU32BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU32BE adds a field and reads 32 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU32BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U32BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U33BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU33BE tries to read 33 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU33BE() (uint64, error) { return d.tryUE(33, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U33BE reads 33 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U33BE() uint64 {
|
|
|
|
v, err := d.tryUE(33, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U33BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU33BE tries to add a field and read 33 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU33BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU33BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU33BE adds a field and reads 33 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU33BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U33BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U34BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU34BE tries to read 34 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU34BE() (uint64, error) { return d.tryUE(34, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U34BE reads 34 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U34BE() uint64 {
|
|
|
|
v, err := d.tryUE(34, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U34BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU34BE tries to add a field and read 34 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU34BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU34BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU34BE adds a field and reads 34 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU34BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U34BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U35BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU35BE tries to read 35 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU35BE() (uint64, error) { return d.tryUE(35, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U35BE reads 35 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U35BE() uint64 {
|
|
|
|
v, err := d.tryUE(35, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U35BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU35BE tries to add a field and read 35 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU35BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU35BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU35BE adds a field and reads 35 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU35BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U35BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U36BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU36BE tries to read 36 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU36BE() (uint64, error) { return d.tryUE(36, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U36BE reads 36 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U36BE() uint64 {
|
|
|
|
v, err := d.tryUE(36, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U36BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU36BE tries to add a field and read 36 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU36BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU36BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU36BE adds a field and reads 36 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU36BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U36BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U37BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU37BE tries to read 37 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU37BE() (uint64, error) { return d.tryUE(37, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U37BE reads 37 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U37BE() uint64 {
|
|
|
|
v, err := d.tryUE(37, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U37BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU37BE tries to add a field and read 37 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU37BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU37BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU37BE adds a field and reads 37 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU37BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U37BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U38BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU38BE tries to read 38 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU38BE() (uint64, error) { return d.tryUE(38, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U38BE reads 38 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U38BE() uint64 {
|
|
|
|
v, err := d.tryUE(38, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U38BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU38BE tries to add a field and read 38 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU38BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU38BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU38BE adds a field and reads 38 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU38BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U38BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U39BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU39BE tries to read 39 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU39BE() (uint64, error) { return d.tryUE(39, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U39BE reads 39 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U39BE() uint64 {
|
|
|
|
v, err := d.tryUE(39, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U39BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU39BE tries to add a field and read 39 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU39BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU39BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU39BE adds a field and reads 39 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU39BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U39BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U40BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU40BE tries to read 40 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU40BE() (uint64, error) { return d.tryUE(40, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U40BE reads 40 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U40BE() uint64 {
|
|
|
|
v, err := d.tryUE(40, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U40BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU40BE tries to add a field and read 40 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU40BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU40BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU40BE adds a field and reads 40 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU40BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U40BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U41BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU41BE tries to read 41 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU41BE() (uint64, error) { return d.tryUE(41, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U41BE reads 41 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U41BE() uint64 {
|
|
|
|
v, err := d.tryUE(41, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U41BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU41BE tries to add a field and read 41 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU41BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU41BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU41BE adds a field and reads 41 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU41BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U41BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U42BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU42BE tries to read 42 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU42BE() (uint64, error) { return d.tryUE(42, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U42BE reads 42 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U42BE() uint64 {
|
|
|
|
v, err := d.tryUE(42, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U42BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU42BE tries to add a field and read 42 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU42BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU42BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU42BE adds a field and reads 42 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU42BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U42BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U43BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU43BE tries to read 43 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU43BE() (uint64, error) { return d.tryUE(43, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U43BE reads 43 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U43BE() uint64 {
|
|
|
|
v, err := d.tryUE(43, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U43BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU43BE tries to add a field and read 43 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU43BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU43BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU43BE adds a field and reads 43 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU43BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U43BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U44BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU44BE tries to read 44 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU44BE() (uint64, error) { return d.tryUE(44, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U44BE reads 44 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U44BE() uint64 {
|
|
|
|
v, err := d.tryUE(44, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U44BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU44BE tries to add a field and read 44 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU44BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU44BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU44BE adds a field and reads 44 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU44BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U44BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U45BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU45BE tries to read 45 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU45BE() (uint64, error) { return d.tryUE(45, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U45BE reads 45 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U45BE() uint64 {
|
|
|
|
v, err := d.tryUE(45, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U45BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU45BE tries to add a field and read 45 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU45BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU45BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU45BE adds a field and reads 45 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU45BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U45BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U46BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU46BE tries to read 46 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU46BE() (uint64, error) { return d.tryUE(46, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U46BE reads 46 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U46BE() uint64 {
|
|
|
|
v, err := d.tryUE(46, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U46BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU46BE tries to add a field and read 46 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU46BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU46BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU46BE adds a field and reads 46 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU46BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U46BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U47BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU47BE tries to read 47 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU47BE() (uint64, error) { return d.tryUE(47, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U47BE reads 47 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U47BE() uint64 {
|
|
|
|
v, err := d.tryUE(47, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U47BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU47BE tries to add a field and read 47 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU47BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU47BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU47BE adds a field and reads 47 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU47BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U47BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U48BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU48BE tries to read 48 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU48BE() (uint64, error) { return d.tryUE(48, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U48BE reads 48 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U48BE() uint64 {
|
|
|
|
v, err := d.tryUE(48, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U48BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU48BE tries to add a field and read 48 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU48BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU48BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU48BE adds a field and reads 48 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU48BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U48BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U49BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU49BE tries to read 49 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU49BE() (uint64, error) { return d.tryUE(49, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U49BE reads 49 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U49BE() uint64 {
|
|
|
|
v, err := d.tryUE(49, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U49BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU49BE tries to add a field and read 49 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU49BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU49BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU49BE adds a field and reads 49 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU49BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U49BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U50BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU50BE tries to read 50 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU50BE() (uint64, error) { return d.tryUE(50, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U50BE reads 50 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U50BE() uint64 {
|
|
|
|
v, err := d.tryUE(50, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U50BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU50BE tries to add a field and read 50 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU50BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU50BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU50BE adds a field and reads 50 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU50BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U50BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U51BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU51BE tries to read 51 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU51BE() (uint64, error) { return d.tryUE(51, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U51BE reads 51 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U51BE() uint64 {
|
|
|
|
v, err := d.tryUE(51, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U51BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU51BE tries to add a field and read 51 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU51BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU51BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU51BE adds a field and reads 51 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU51BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U51BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U52BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU52BE tries to read 52 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU52BE() (uint64, error) { return d.tryUE(52, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U52BE reads 52 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U52BE() uint64 {
|
|
|
|
v, err := d.tryUE(52, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U52BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU52BE tries to add a field and read 52 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU52BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU52BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU52BE adds a field and reads 52 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU52BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U52BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U53BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU53BE tries to read 53 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU53BE() (uint64, error) { return d.tryUE(53, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U53BE reads 53 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U53BE() uint64 {
|
|
|
|
v, err := d.tryUE(53, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U53BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU53BE tries to add a field and read 53 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU53BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU53BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU53BE adds a field and reads 53 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU53BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U53BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U54BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU54BE tries to read 54 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU54BE() (uint64, error) { return d.tryUE(54, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U54BE reads 54 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U54BE() uint64 {
|
|
|
|
v, err := d.tryUE(54, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U54BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU54BE tries to add a field and read 54 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU54BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU54BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU54BE adds a field and reads 54 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU54BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U54BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U55BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU55BE tries to read 55 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU55BE() (uint64, error) { return d.tryUE(55, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U55BE reads 55 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U55BE() uint64 {
|
|
|
|
v, err := d.tryUE(55, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U55BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU55BE tries to add a field and read 55 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU55BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU55BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU55BE adds a field and reads 55 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU55BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U55BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U56BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU56BE tries to read 56 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU56BE() (uint64, error) { return d.tryUE(56, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U56BE reads 56 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U56BE() uint64 {
|
|
|
|
v, err := d.tryUE(56, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U56BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU56BE tries to add a field and read 56 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU56BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU56BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU56BE adds a field and reads 56 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU56BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U56BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U57BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU57BE tries to read 57 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU57BE() (uint64, error) { return d.tryUE(57, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U57BE reads 57 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U57BE() uint64 {
|
|
|
|
v, err := d.tryUE(57, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U57BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU57BE tries to add a field and read 57 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU57BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU57BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU57BE adds a field and reads 57 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU57BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U57BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U58BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU58BE tries to read 58 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU58BE() (uint64, error) { return d.tryUE(58, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U58BE reads 58 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U58BE() uint64 {
|
|
|
|
v, err := d.tryUE(58, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U58BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU58BE tries to add a field and read 58 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU58BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU58BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU58BE adds a field and reads 58 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU58BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U58BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U59BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU59BE tries to read 59 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU59BE() (uint64, error) { return d.tryUE(59, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U59BE reads 59 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U59BE() uint64 {
|
|
|
|
v, err := d.tryUE(59, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U59BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU59BE tries to add a field and read 59 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU59BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU59BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU59BE adds a field and reads 59 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU59BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U59BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U60BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU60BE tries to read 60 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU60BE() (uint64, error) { return d.tryUE(60, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U60BE reads 60 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U60BE() uint64 {
|
|
|
|
v, err := d.tryUE(60, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U60BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU60BE tries to add a field and read 60 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU60BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU60BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU60BE adds a field and reads 60 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU60BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U60BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U61BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU61BE tries to read 61 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU61BE() (uint64, error) { return d.tryUE(61, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U61BE reads 61 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U61BE() uint64 {
|
|
|
|
v, err := d.tryUE(61, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U61BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU61BE tries to add a field and read 61 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU61BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU61BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU61BE adds a field and reads 61 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU61BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U61BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U62BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU62BE tries to read 62 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU62BE() (uint64, error) { return d.tryUE(62, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U62BE reads 62 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U62BE() uint64 {
|
|
|
|
v, err := d.tryUE(62, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U62BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU62BE tries to add a field and read 62 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU62BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU62BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU62BE adds a field and reads 62 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU62BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U62BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U63BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU63BE tries to read 63 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU63BE() (uint64, error) { return d.tryUE(63, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U63BE reads 63 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U63BE() uint64 {
|
|
|
|
v, err := d.tryUE(63, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U63BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU63BE tries to add a field and read 63 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU63BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU63BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU63BE adds a field and reads 63 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU63BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U63BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader U64BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryU64BE tries to read 64 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryU64BE() (uint64, error) { return d.tryUE(64, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// U64BE reads 64 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) U64BE() uint64 {
|
|
|
|
v, err := d.tryUE(64, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "U64BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldU64BE tries to add a field and read 64 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldU64BE(name string, sfns ...ScalarFn) (uint64, error) {
|
|
|
|
return d.TryFieldUFn(name, (*D).TryU64BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldU64BE adds a field and reads 64 bit unsigned integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldU64BE(name string, sfns ...ScalarFn) uint64 {
|
|
|
|
return d.FieldUFn(name, (*D).U64BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Reader S
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS tries to read nBits bits signed integer in current endian
|
|
|
|
func (d *D) TryS(nBits int) (int64, error) { return d.trySE(nBits, d.Endian) }
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S reads nBits bits signed integer in current endian
|
|
|
|
func (d *D) S(nBits int) int64 {
|
|
|
|
v, err := d.trySE(nBits, d.Endian)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Op: "S", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS tries to add a field and read nBits bits signed integer in current endian
|
|
|
|
func (d *D) TryFieldS(name string, nBits int, sfns ...ScalarFn) (int64, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.trySE(nBits, d.Endian)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualS(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS adds a field and reads nBits bits signed integer in current endian
|
|
|
|
func (d *D) FieldS(name string, nBits int, sfns ...ScalarFn) int64 {
|
|
|
|
v, err := d.TryFieldS(name, nBits, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Name: name, Op: "S", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Reader SE
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TrySE tries to read nBits signed integer in specified endian
|
|
|
|
func (d *D) TrySE(nBits int, endian Endian) (int64, error) { return d.trySE(nBits, endian) }
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// SE reads nBits signed integer in specified endian
|
|
|
|
func (d *D) SE(nBits int, endian Endian) int64 {
|
|
|
|
v, err := d.trySE(nBits, endian)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Op: "SE", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldSE tries to add a field and read nBits signed integer in specified endian
|
|
|
|
func (d *D) TryFieldSE(name string, nBits int, endian Endian, sfns ...ScalarFn) (int64, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.trySE(nBits, endian)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualS(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldSE adds a field and reads nBits signed integer in specified endian
|
|
|
|
func (d *D) FieldSE(name string, nBits int, endian Endian, sfns ...ScalarFn) int64 {
|
|
|
|
v, err := d.TryFieldSE(name, nBits, endian, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Name: name, Op: "SE", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S1
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS1 tries to read 1 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS1() (int64, error) { return d.trySE(1, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S1 reads 1 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S1() int64 {
|
|
|
|
v, err := d.trySE(1, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S1", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS1 tries to add a field and read 1 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS1(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS1, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS1 adds a field and reads 1 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS1(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S1, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S2
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS2 tries to read 2 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS2() (int64, error) { return d.trySE(2, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S2 reads 2 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S2() int64 {
|
|
|
|
v, err := d.trySE(2, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S2", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS2 tries to add a field and read 2 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS2(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS2, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS2 adds a field and reads 2 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS2(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S2, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S3
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS3 tries to read 3 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS3() (int64, error) { return d.trySE(3, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S3 reads 3 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S3() int64 {
|
|
|
|
v, err := d.trySE(3, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S3", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS3 tries to add a field and read 3 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS3(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS3, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS3 adds a field and reads 3 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS3(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S3, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S4
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS4 tries to read 4 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS4() (int64, error) { return d.trySE(4, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S4 reads 4 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S4() int64 {
|
|
|
|
v, err := d.trySE(4, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S4", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS4 tries to add a field and read 4 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS4(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS4, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS4 adds a field and reads 4 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS4(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S4, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S5
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS5 tries to read 5 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS5() (int64, error) { return d.trySE(5, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S5 reads 5 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S5() int64 {
|
|
|
|
v, err := d.trySE(5, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S5", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS5 tries to add a field and read 5 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS5(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS5, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS5 adds a field and reads 5 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS5(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S5, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S6
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS6 tries to read 6 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS6() (int64, error) { return d.trySE(6, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S6 reads 6 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S6() int64 {
|
|
|
|
v, err := d.trySE(6, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S6", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS6 tries to add a field and read 6 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS6(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS6, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS6 adds a field and reads 6 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS6(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S6, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S7
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS7 tries to read 7 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS7() (int64, error) { return d.trySE(7, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S7 reads 7 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S7() int64 {
|
|
|
|
v, err := d.trySE(7, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S7", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS7 tries to add a field and read 7 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS7(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS7, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS7 adds a field and reads 7 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS7(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S7, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S8
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS8 tries to read 8 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS8() (int64, error) { return d.trySE(8, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S8 reads 8 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S8() int64 {
|
|
|
|
v, err := d.trySE(8, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S8", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS8 tries to add a field and read 8 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS8(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS8, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS8 adds a field and reads 8 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS8(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S8, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S9
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS9 tries to read 9 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS9() (int64, error) { return d.trySE(9, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S9 reads 9 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S9() int64 {
|
|
|
|
v, err := d.trySE(9, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S9", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS9 tries to add a field and read 9 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS9(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS9, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS9 adds a field and reads 9 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS9(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S9, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S10
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS10 tries to read 10 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS10() (int64, error) { return d.trySE(10, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S10 reads 10 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S10() int64 {
|
|
|
|
v, err := d.trySE(10, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S10", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS10 tries to add a field and read 10 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS10(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS10, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS10 adds a field and reads 10 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS10(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S10, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S11
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS11 tries to read 11 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS11() (int64, error) { return d.trySE(11, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S11 reads 11 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S11() int64 {
|
|
|
|
v, err := d.trySE(11, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S11", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS11 tries to add a field and read 11 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS11(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS11, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS11 adds a field and reads 11 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS11(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S11, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S12
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS12 tries to read 12 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS12() (int64, error) { return d.trySE(12, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S12 reads 12 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S12() int64 {
|
|
|
|
v, err := d.trySE(12, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S12", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS12 tries to add a field and read 12 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS12(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS12, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS12 adds a field and reads 12 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS12(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S12, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S13
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS13 tries to read 13 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS13() (int64, error) { return d.trySE(13, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S13 reads 13 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S13() int64 {
|
|
|
|
v, err := d.trySE(13, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S13", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS13 tries to add a field and read 13 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS13(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS13, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS13 adds a field and reads 13 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS13(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S13, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S14
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS14 tries to read 14 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS14() (int64, error) { return d.trySE(14, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S14 reads 14 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S14() int64 {
|
|
|
|
v, err := d.trySE(14, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S14", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS14 tries to add a field and read 14 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS14(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS14, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS14 adds a field and reads 14 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS14(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S14, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S15
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS15 tries to read 15 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS15() (int64, error) { return d.trySE(15, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S15 reads 15 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S15() int64 {
|
|
|
|
v, err := d.trySE(15, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S15", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS15 tries to add a field and read 15 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS15(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS15, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS15 adds a field and reads 15 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS15(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S15, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S16
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS16 tries to read 16 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS16() (int64, error) { return d.trySE(16, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S16 reads 16 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S16() int64 {
|
|
|
|
v, err := d.trySE(16, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S16", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS16 tries to add a field and read 16 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS16(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS16, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS16 adds a field and reads 16 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS16(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S16, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S17
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS17 tries to read 17 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS17() (int64, error) { return d.trySE(17, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S17 reads 17 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S17() int64 {
|
|
|
|
v, err := d.trySE(17, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S17", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS17 tries to add a field and read 17 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS17(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS17, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS17 adds a field and reads 17 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS17(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S17, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S18
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS18 tries to read 18 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS18() (int64, error) { return d.trySE(18, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S18 reads 18 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S18() int64 {
|
|
|
|
v, err := d.trySE(18, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S18", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS18 tries to add a field and read 18 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS18(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS18, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS18 adds a field and reads 18 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS18(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S18, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S19
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS19 tries to read 19 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS19() (int64, error) { return d.trySE(19, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S19 reads 19 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S19() int64 {
|
|
|
|
v, err := d.trySE(19, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S19", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS19 tries to add a field and read 19 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS19(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS19, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS19 adds a field and reads 19 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS19(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S19, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S20
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS20 tries to read 20 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS20() (int64, error) { return d.trySE(20, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S20 reads 20 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S20() int64 {
|
|
|
|
v, err := d.trySE(20, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S20", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS20 tries to add a field and read 20 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS20(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS20, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS20 adds a field and reads 20 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS20(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S20, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S21
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS21 tries to read 21 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS21() (int64, error) { return d.trySE(21, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S21 reads 21 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S21() int64 {
|
|
|
|
v, err := d.trySE(21, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S21", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS21 tries to add a field and read 21 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS21(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS21, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS21 adds a field and reads 21 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS21(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S21, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S22
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS22 tries to read 22 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS22() (int64, error) { return d.trySE(22, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S22 reads 22 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S22() int64 {
|
|
|
|
v, err := d.trySE(22, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S22", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS22 tries to add a field and read 22 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS22(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS22, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS22 adds a field and reads 22 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS22(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S22, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S23
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS23 tries to read 23 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS23() (int64, error) { return d.trySE(23, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S23 reads 23 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S23() int64 {
|
|
|
|
v, err := d.trySE(23, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S23", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS23 tries to add a field and read 23 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS23(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS23, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS23 adds a field and reads 23 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS23(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S23, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S24
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS24 tries to read 24 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS24() (int64, error) { return d.trySE(24, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S24 reads 24 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S24() int64 {
|
|
|
|
v, err := d.trySE(24, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S24", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS24 tries to add a field and read 24 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS24(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS24, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS24 adds a field and reads 24 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS24(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S24, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S25
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS25 tries to read 25 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS25() (int64, error) { return d.trySE(25, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S25 reads 25 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S25() int64 {
|
|
|
|
v, err := d.trySE(25, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S25", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS25 tries to add a field and read 25 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS25(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS25, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS25 adds a field and reads 25 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS25(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S25, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S26
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS26 tries to read 26 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS26() (int64, error) { return d.trySE(26, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S26 reads 26 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S26() int64 {
|
|
|
|
v, err := d.trySE(26, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S26", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS26 tries to add a field and read 26 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS26(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS26, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS26 adds a field and reads 26 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS26(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S26, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S27
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS27 tries to read 27 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS27() (int64, error) { return d.trySE(27, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S27 reads 27 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S27() int64 {
|
|
|
|
v, err := d.trySE(27, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S27", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS27 tries to add a field and read 27 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS27(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS27, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS27 adds a field and reads 27 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS27(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S27, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S28
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS28 tries to read 28 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS28() (int64, error) { return d.trySE(28, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S28 reads 28 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S28() int64 {
|
|
|
|
v, err := d.trySE(28, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S28", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS28 tries to add a field and read 28 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS28(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS28, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS28 adds a field and reads 28 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS28(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S28, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S29
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS29 tries to read 29 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS29() (int64, error) { return d.trySE(29, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S29 reads 29 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S29() int64 {
|
|
|
|
v, err := d.trySE(29, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S29", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS29 tries to add a field and read 29 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS29(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS29, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS29 adds a field and reads 29 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS29(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S29, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S30
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS30 tries to read 30 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS30() (int64, error) { return d.trySE(30, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S30 reads 30 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S30() int64 {
|
|
|
|
v, err := d.trySE(30, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S30", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS30 tries to add a field and read 30 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS30(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS30, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS30 adds a field and reads 30 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS30(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S30, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S31
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS31 tries to read 31 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS31() (int64, error) { return d.trySE(31, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S31 reads 31 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S31() int64 {
|
|
|
|
v, err := d.trySE(31, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S31", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS31 tries to add a field and read 31 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS31(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS31, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS31 adds a field and reads 31 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS31(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S31, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S32
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS32 tries to read 32 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS32() (int64, error) { return d.trySE(32, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S32 reads 32 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S32() int64 {
|
|
|
|
v, err := d.trySE(32, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S32", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS32 tries to add a field and read 32 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS32(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS32, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS32 adds a field and reads 32 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS32(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S32, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S33
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS33 tries to read 33 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS33() (int64, error) { return d.trySE(33, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S33 reads 33 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S33() int64 {
|
|
|
|
v, err := d.trySE(33, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S33", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS33 tries to add a field and read 33 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS33(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS33, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS33 adds a field and reads 33 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS33(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S33, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S34
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS34 tries to read 34 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS34() (int64, error) { return d.trySE(34, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S34 reads 34 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S34() int64 {
|
|
|
|
v, err := d.trySE(34, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S34", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS34 tries to add a field and read 34 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS34(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS34, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS34 adds a field and reads 34 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS34(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S34, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S35
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS35 tries to read 35 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS35() (int64, error) { return d.trySE(35, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S35 reads 35 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S35() int64 {
|
|
|
|
v, err := d.trySE(35, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S35", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS35 tries to add a field and read 35 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS35(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS35, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS35 adds a field and reads 35 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS35(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S35, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S36
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS36 tries to read 36 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS36() (int64, error) { return d.trySE(36, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S36 reads 36 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S36() int64 {
|
|
|
|
v, err := d.trySE(36, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S36", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS36 tries to add a field and read 36 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS36(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS36, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS36 adds a field and reads 36 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS36(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S36, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S37
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS37 tries to read 37 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS37() (int64, error) { return d.trySE(37, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S37 reads 37 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S37() int64 {
|
|
|
|
v, err := d.trySE(37, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S37", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS37 tries to add a field and read 37 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS37(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS37, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS37 adds a field and reads 37 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS37(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S37, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S38
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS38 tries to read 38 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS38() (int64, error) { return d.trySE(38, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S38 reads 38 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S38() int64 {
|
|
|
|
v, err := d.trySE(38, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S38", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS38 tries to add a field and read 38 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS38(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS38, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS38 adds a field and reads 38 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS38(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S38, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S39
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS39 tries to read 39 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS39() (int64, error) { return d.trySE(39, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S39 reads 39 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S39() int64 {
|
|
|
|
v, err := d.trySE(39, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S39", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS39 tries to add a field and read 39 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS39(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS39, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS39 adds a field and reads 39 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS39(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S39, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S40
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS40 tries to read 40 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS40() (int64, error) { return d.trySE(40, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S40 reads 40 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S40() int64 {
|
|
|
|
v, err := d.trySE(40, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S40", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS40 tries to add a field and read 40 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS40(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS40, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS40 adds a field and reads 40 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS40(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S40, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S41
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS41 tries to read 41 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS41() (int64, error) { return d.trySE(41, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S41 reads 41 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S41() int64 {
|
|
|
|
v, err := d.trySE(41, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S41", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS41 tries to add a field and read 41 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS41(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS41, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS41 adds a field and reads 41 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS41(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S41, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S42
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS42 tries to read 42 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS42() (int64, error) { return d.trySE(42, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S42 reads 42 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S42() int64 {
|
|
|
|
v, err := d.trySE(42, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S42", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS42 tries to add a field and read 42 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS42(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS42, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS42 adds a field and reads 42 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS42(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S42, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S43
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS43 tries to read 43 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS43() (int64, error) { return d.trySE(43, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S43 reads 43 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S43() int64 {
|
|
|
|
v, err := d.trySE(43, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S43", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS43 tries to add a field and read 43 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS43(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS43, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS43 adds a field and reads 43 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS43(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S43, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S44
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS44 tries to read 44 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS44() (int64, error) { return d.trySE(44, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S44 reads 44 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S44() int64 {
|
|
|
|
v, err := d.trySE(44, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S44", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS44 tries to add a field and read 44 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS44(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS44, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS44 adds a field and reads 44 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS44(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S44, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S45
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS45 tries to read 45 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS45() (int64, error) { return d.trySE(45, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S45 reads 45 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S45() int64 {
|
|
|
|
v, err := d.trySE(45, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S45", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS45 tries to add a field and read 45 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS45(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS45, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS45 adds a field and reads 45 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS45(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S45, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S46
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS46 tries to read 46 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS46() (int64, error) { return d.trySE(46, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S46 reads 46 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S46() int64 {
|
|
|
|
v, err := d.trySE(46, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S46", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS46 tries to add a field and read 46 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS46(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS46, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS46 adds a field and reads 46 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS46(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S46, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S47
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS47 tries to read 47 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS47() (int64, error) { return d.trySE(47, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S47 reads 47 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S47() int64 {
|
|
|
|
v, err := d.trySE(47, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S47", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS47 tries to add a field and read 47 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS47(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS47, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS47 adds a field and reads 47 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS47(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S47, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S48
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS48 tries to read 48 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS48() (int64, error) { return d.trySE(48, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S48 reads 48 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S48() int64 {
|
|
|
|
v, err := d.trySE(48, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S48", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS48 tries to add a field and read 48 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS48(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS48, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS48 adds a field and reads 48 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS48(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S48, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S49
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS49 tries to read 49 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS49() (int64, error) { return d.trySE(49, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S49 reads 49 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S49() int64 {
|
|
|
|
v, err := d.trySE(49, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S49", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS49 tries to add a field and read 49 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS49(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS49, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS49 adds a field and reads 49 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS49(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S49, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S50
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS50 tries to read 50 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS50() (int64, error) { return d.trySE(50, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S50 reads 50 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S50() int64 {
|
|
|
|
v, err := d.trySE(50, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S50", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS50 tries to add a field and read 50 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS50(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS50, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS50 adds a field and reads 50 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS50(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S50, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S51
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS51 tries to read 51 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS51() (int64, error) { return d.trySE(51, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S51 reads 51 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S51() int64 {
|
|
|
|
v, err := d.trySE(51, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S51", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS51 tries to add a field and read 51 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS51(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS51, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS51 adds a field and reads 51 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS51(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S51, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S52
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS52 tries to read 52 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS52() (int64, error) { return d.trySE(52, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S52 reads 52 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S52() int64 {
|
|
|
|
v, err := d.trySE(52, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S52", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS52 tries to add a field and read 52 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS52(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS52, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS52 adds a field and reads 52 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS52(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S52, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S53
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS53 tries to read 53 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS53() (int64, error) { return d.trySE(53, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S53 reads 53 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S53() int64 {
|
|
|
|
v, err := d.trySE(53, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S53", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS53 tries to add a field and read 53 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS53(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS53, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS53 adds a field and reads 53 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS53(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S53, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S54
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS54 tries to read 54 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS54() (int64, error) { return d.trySE(54, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S54 reads 54 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S54() int64 {
|
|
|
|
v, err := d.trySE(54, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S54", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS54 tries to add a field and read 54 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS54(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS54, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS54 adds a field and reads 54 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS54(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S54, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S55
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS55 tries to read 55 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS55() (int64, error) { return d.trySE(55, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S55 reads 55 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S55() int64 {
|
|
|
|
v, err := d.trySE(55, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S55", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS55 tries to add a field and read 55 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS55(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS55, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS55 adds a field and reads 55 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS55(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S55, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S56
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS56 tries to read 56 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS56() (int64, error) { return d.trySE(56, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S56 reads 56 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S56() int64 {
|
|
|
|
v, err := d.trySE(56, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S56", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS56 tries to add a field and read 56 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS56(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS56, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS56 adds a field and reads 56 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS56(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S56, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S57
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS57 tries to read 57 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS57() (int64, error) { return d.trySE(57, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S57 reads 57 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S57() int64 {
|
|
|
|
v, err := d.trySE(57, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S57", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS57 tries to add a field and read 57 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS57(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS57, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS57 adds a field and reads 57 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS57(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S57, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S58
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS58 tries to read 58 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS58() (int64, error) { return d.trySE(58, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S58 reads 58 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S58() int64 {
|
|
|
|
v, err := d.trySE(58, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S58", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS58 tries to add a field and read 58 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS58(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS58, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS58 adds a field and reads 58 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS58(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S58, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S59
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS59 tries to read 59 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS59() (int64, error) { return d.trySE(59, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S59 reads 59 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S59() int64 {
|
|
|
|
v, err := d.trySE(59, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S59", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS59 tries to add a field and read 59 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS59(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS59, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS59 adds a field and reads 59 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS59(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S59, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S60
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS60 tries to read 60 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS60() (int64, error) { return d.trySE(60, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S60 reads 60 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S60() int64 {
|
|
|
|
v, err := d.trySE(60, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S60", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS60 tries to add a field and read 60 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS60(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS60, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS60 adds a field and reads 60 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS60(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S60, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S61
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS61 tries to read 61 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS61() (int64, error) { return d.trySE(61, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S61 reads 61 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S61() int64 {
|
|
|
|
v, err := d.trySE(61, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S61", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS61 tries to add a field and read 61 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS61(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS61, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS61 adds a field and reads 61 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS61(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S61, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S62
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS62 tries to read 62 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS62() (int64, error) { return d.trySE(62, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S62 reads 62 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S62() int64 {
|
|
|
|
v, err := d.trySE(62, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S62", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS62 tries to add a field and read 62 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS62(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS62, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS62 adds a field and reads 62 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS62(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S62, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S63
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS63 tries to read 63 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS63() (int64, error) { return d.trySE(63, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S63 reads 63 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S63() int64 {
|
|
|
|
v, err := d.trySE(63, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S63", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS63 tries to add a field and read 63 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS63(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS63, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS63 adds a field and reads 63 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS63(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S63, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS64 tries to read 64 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS64() (int64, error) { return d.trySE(64, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S64 reads 64 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S64() int64 {
|
|
|
|
v, err := d.trySE(64, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S64", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS64 tries to add a field and read 64 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS64(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS64, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS64 adds a field and reads 64 bit signed integer in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS64(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S64, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S8LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS8LE tries to read 8 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS8LE() (int64, error) { return d.trySE(8, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S8LE reads 8 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S8LE() int64 {
|
|
|
|
v, err := d.trySE(8, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S8LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS8LE tries to add a field and read 8 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS8LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS8LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS8LE adds a field and reads 8 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS8LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S8LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S9LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS9LE tries to read 9 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS9LE() (int64, error) { return d.trySE(9, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S9LE reads 9 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S9LE() int64 {
|
|
|
|
v, err := d.trySE(9, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S9LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS9LE tries to add a field and read 9 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS9LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS9LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS9LE adds a field and reads 9 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS9LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S9LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S10LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS10LE tries to read 10 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS10LE() (int64, error) { return d.trySE(10, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S10LE reads 10 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S10LE() int64 {
|
|
|
|
v, err := d.trySE(10, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S10LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS10LE tries to add a field and read 10 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS10LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS10LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS10LE adds a field and reads 10 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS10LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S10LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S11LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS11LE tries to read 11 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS11LE() (int64, error) { return d.trySE(11, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S11LE reads 11 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S11LE() int64 {
|
|
|
|
v, err := d.trySE(11, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S11LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS11LE tries to add a field and read 11 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS11LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS11LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS11LE adds a field and reads 11 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS11LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S11LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S12LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS12LE tries to read 12 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS12LE() (int64, error) { return d.trySE(12, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S12LE reads 12 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S12LE() int64 {
|
|
|
|
v, err := d.trySE(12, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S12LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS12LE tries to add a field and read 12 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS12LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS12LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS12LE adds a field and reads 12 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS12LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S12LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S13LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS13LE tries to read 13 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS13LE() (int64, error) { return d.trySE(13, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S13LE reads 13 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S13LE() int64 {
|
|
|
|
v, err := d.trySE(13, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S13LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS13LE tries to add a field and read 13 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS13LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS13LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS13LE adds a field and reads 13 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS13LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S13LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S14LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS14LE tries to read 14 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS14LE() (int64, error) { return d.trySE(14, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S14LE reads 14 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S14LE() int64 {
|
|
|
|
v, err := d.trySE(14, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S14LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS14LE tries to add a field and read 14 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS14LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS14LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS14LE adds a field and reads 14 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS14LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S14LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S15LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS15LE tries to read 15 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS15LE() (int64, error) { return d.trySE(15, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S15LE reads 15 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S15LE() int64 {
|
|
|
|
v, err := d.trySE(15, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S15LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS15LE tries to add a field and read 15 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS15LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS15LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS15LE adds a field and reads 15 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS15LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S15LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S16LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS16LE tries to read 16 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS16LE() (int64, error) { return d.trySE(16, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S16LE reads 16 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S16LE() int64 {
|
|
|
|
v, err := d.trySE(16, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S16LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS16LE tries to add a field and read 16 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS16LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS16LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS16LE adds a field and reads 16 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS16LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S16LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S17LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS17LE tries to read 17 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS17LE() (int64, error) { return d.trySE(17, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S17LE reads 17 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S17LE() int64 {
|
|
|
|
v, err := d.trySE(17, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S17LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS17LE tries to add a field and read 17 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS17LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS17LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS17LE adds a field and reads 17 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS17LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S17LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S18LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS18LE tries to read 18 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS18LE() (int64, error) { return d.trySE(18, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S18LE reads 18 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S18LE() int64 {
|
|
|
|
v, err := d.trySE(18, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S18LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS18LE tries to add a field and read 18 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS18LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS18LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS18LE adds a field and reads 18 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS18LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S18LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S19LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS19LE tries to read 19 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS19LE() (int64, error) { return d.trySE(19, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S19LE reads 19 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S19LE() int64 {
|
|
|
|
v, err := d.trySE(19, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S19LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS19LE tries to add a field and read 19 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS19LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS19LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS19LE adds a field and reads 19 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS19LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S19LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S20LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS20LE tries to read 20 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS20LE() (int64, error) { return d.trySE(20, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S20LE reads 20 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S20LE() int64 {
|
|
|
|
v, err := d.trySE(20, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S20LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS20LE tries to add a field and read 20 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS20LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS20LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS20LE adds a field and reads 20 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS20LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S20LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S21LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS21LE tries to read 21 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS21LE() (int64, error) { return d.trySE(21, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S21LE reads 21 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S21LE() int64 {
|
|
|
|
v, err := d.trySE(21, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S21LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS21LE tries to add a field and read 21 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS21LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS21LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS21LE adds a field and reads 21 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS21LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S21LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S22LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS22LE tries to read 22 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS22LE() (int64, error) { return d.trySE(22, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S22LE reads 22 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S22LE() int64 {
|
|
|
|
v, err := d.trySE(22, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S22LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS22LE tries to add a field and read 22 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS22LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS22LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS22LE adds a field and reads 22 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS22LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S22LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S23LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS23LE tries to read 23 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS23LE() (int64, error) { return d.trySE(23, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S23LE reads 23 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S23LE() int64 {
|
|
|
|
v, err := d.trySE(23, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S23LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS23LE tries to add a field and read 23 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS23LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS23LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS23LE adds a field and reads 23 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS23LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S23LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S24LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS24LE tries to read 24 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS24LE() (int64, error) { return d.trySE(24, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S24LE reads 24 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S24LE() int64 {
|
|
|
|
v, err := d.trySE(24, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S24LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS24LE tries to add a field and read 24 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS24LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS24LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS24LE adds a field and reads 24 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS24LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S24LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S25LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS25LE tries to read 25 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS25LE() (int64, error) { return d.trySE(25, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S25LE reads 25 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S25LE() int64 {
|
|
|
|
v, err := d.trySE(25, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S25LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS25LE tries to add a field and read 25 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS25LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS25LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS25LE adds a field and reads 25 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS25LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S25LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S26LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS26LE tries to read 26 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS26LE() (int64, error) { return d.trySE(26, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S26LE reads 26 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S26LE() int64 {
|
|
|
|
v, err := d.trySE(26, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S26LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS26LE tries to add a field and read 26 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS26LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS26LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS26LE adds a field and reads 26 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS26LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S26LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S27LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS27LE tries to read 27 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS27LE() (int64, error) { return d.trySE(27, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S27LE reads 27 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S27LE() int64 {
|
|
|
|
v, err := d.trySE(27, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S27LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS27LE tries to add a field and read 27 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS27LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS27LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS27LE adds a field and reads 27 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS27LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S27LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S28LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS28LE tries to read 28 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS28LE() (int64, error) { return d.trySE(28, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S28LE reads 28 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S28LE() int64 {
|
|
|
|
v, err := d.trySE(28, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S28LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS28LE tries to add a field and read 28 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS28LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS28LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS28LE adds a field and reads 28 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS28LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S28LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S29LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS29LE tries to read 29 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS29LE() (int64, error) { return d.trySE(29, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S29LE reads 29 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S29LE() int64 {
|
|
|
|
v, err := d.trySE(29, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S29LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS29LE tries to add a field and read 29 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS29LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS29LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS29LE adds a field and reads 29 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS29LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S29LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S30LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS30LE tries to read 30 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS30LE() (int64, error) { return d.trySE(30, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S30LE reads 30 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S30LE() int64 {
|
|
|
|
v, err := d.trySE(30, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S30LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS30LE tries to add a field and read 30 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS30LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS30LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS30LE adds a field and reads 30 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS30LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S30LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S31LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS31LE tries to read 31 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS31LE() (int64, error) { return d.trySE(31, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S31LE reads 31 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S31LE() int64 {
|
|
|
|
v, err := d.trySE(31, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S31LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS31LE tries to add a field and read 31 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS31LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS31LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS31LE adds a field and reads 31 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS31LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S31LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S32LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS32LE tries to read 32 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS32LE() (int64, error) { return d.trySE(32, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S32LE reads 32 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S32LE() int64 {
|
|
|
|
v, err := d.trySE(32, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S32LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS32LE tries to add a field and read 32 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS32LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS32LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS32LE adds a field and reads 32 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS32LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S32LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S33LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS33LE tries to read 33 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS33LE() (int64, error) { return d.trySE(33, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S33LE reads 33 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S33LE() int64 {
|
|
|
|
v, err := d.trySE(33, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S33LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS33LE tries to add a field and read 33 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS33LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS33LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS33LE adds a field and reads 33 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS33LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S33LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S34LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS34LE tries to read 34 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS34LE() (int64, error) { return d.trySE(34, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S34LE reads 34 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S34LE() int64 {
|
|
|
|
v, err := d.trySE(34, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S34LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS34LE tries to add a field and read 34 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS34LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS34LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS34LE adds a field and reads 34 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS34LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S34LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S35LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS35LE tries to read 35 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS35LE() (int64, error) { return d.trySE(35, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S35LE reads 35 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S35LE() int64 {
|
|
|
|
v, err := d.trySE(35, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S35LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS35LE tries to add a field and read 35 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS35LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS35LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS35LE adds a field and reads 35 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS35LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S35LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S36LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS36LE tries to read 36 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS36LE() (int64, error) { return d.trySE(36, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S36LE reads 36 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S36LE() int64 {
|
|
|
|
v, err := d.trySE(36, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S36LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS36LE tries to add a field and read 36 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS36LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS36LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS36LE adds a field and reads 36 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS36LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S36LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S37LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS37LE tries to read 37 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS37LE() (int64, error) { return d.trySE(37, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S37LE reads 37 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S37LE() int64 {
|
|
|
|
v, err := d.trySE(37, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S37LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS37LE tries to add a field and read 37 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS37LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS37LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS37LE adds a field and reads 37 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS37LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S37LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S38LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS38LE tries to read 38 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS38LE() (int64, error) { return d.trySE(38, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S38LE reads 38 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S38LE() int64 {
|
|
|
|
v, err := d.trySE(38, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S38LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS38LE tries to add a field and read 38 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS38LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS38LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS38LE adds a field and reads 38 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS38LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S38LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S39LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS39LE tries to read 39 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS39LE() (int64, error) { return d.trySE(39, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S39LE reads 39 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S39LE() int64 {
|
|
|
|
v, err := d.trySE(39, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S39LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS39LE tries to add a field and read 39 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS39LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS39LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS39LE adds a field and reads 39 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS39LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S39LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S40LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS40LE tries to read 40 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS40LE() (int64, error) { return d.trySE(40, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S40LE reads 40 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S40LE() int64 {
|
|
|
|
v, err := d.trySE(40, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S40LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS40LE tries to add a field and read 40 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS40LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS40LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS40LE adds a field and reads 40 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS40LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S40LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S41LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS41LE tries to read 41 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS41LE() (int64, error) { return d.trySE(41, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S41LE reads 41 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S41LE() int64 {
|
|
|
|
v, err := d.trySE(41, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S41LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS41LE tries to add a field and read 41 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS41LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS41LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS41LE adds a field and reads 41 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS41LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S41LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S42LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS42LE tries to read 42 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS42LE() (int64, error) { return d.trySE(42, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S42LE reads 42 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S42LE() int64 {
|
|
|
|
v, err := d.trySE(42, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S42LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS42LE tries to add a field and read 42 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS42LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS42LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS42LE adds a field and reads 42 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS42LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S42LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S43LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS43LE tries to read 43 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS43LE() (int64, error) { return d.trySE(43, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S43LE reads 43 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S43LE() int64 {
|
|
|
|
v, err := d.trySE(43, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S43LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS43LE tries to add a field and read 43 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS43LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS43LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS43LE adds a field and reads 43 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS43LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S43LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S44LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS44LE tries to read 44 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS44LE() (int64, error) { return d.trySE(44, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S44LE reads 44 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S44LE() int64 {
|
|
|
|
v, err := d.trySE(44, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S44LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS44LE tries to add a field and read 44 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS44LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS44LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS44LE adds a field and reads 44 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS44LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S44LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S45LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS45LE tries to read 45 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS45LE() (int64, error) { return d.trySE(45, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S45LE reads 45 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S45LE() int64 {
|
|
|
|
v, err := d.trySE(45, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S45LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS45LE tries to add a field and read 45 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS45LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS45LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS45LE adds a field and reads 45 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS45LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S45LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S46LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS46LE tries to read 46 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS46LE() (int64, error) { return d.trySE(46, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S46LE reads 46 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S46LE() int64 {
|
|
|
|
v, err := d.trySE(46, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S46LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS46LE tries to add a field and read 46 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS46LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS46LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS46LE adds a field and reads 46 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS46LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S46LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S47LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS47LE tries to read 47 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS47LE() (int64, error) { return d.trySE(47, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S47LE reads 47 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S47LE() int64 {
|
|
|
|
v, err := d.trySE(47, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S47LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS47LE tries to add a field and read 47 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS47LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS47LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS47LE adds a field and reads 47 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS47LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S47LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S48LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS48LE tries to read 48 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS48LE() (int64, error) { return d.trySE(48, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S48LE reads 48 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S48LE() int64 {
|
|
|
|
v, err := d.trySE(48, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S48LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS48LE tries to add a field and read 48 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS48LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS48LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS48LE adds a field and reads 48 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS48LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S48LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S49LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS49LE tries to read 49 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS49LE() (int64, error) { return d.trySE(49, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S49LE reads 49 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S49LE() int64 {
|
|
|
|
v, err := d.trySE(49, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S49LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS49LE tries to add a field and read 49 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS49LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS49LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS49LE adds a field and reads 49 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS49LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S49LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S50LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS50LE tries to read 50 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS50LE() (int64, error) { return d.trySE(50, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S50LE reads 50 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S50LE() int64 {
|
|
|
|
v, err := d.trySE(50, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S50LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS50LE tries to add a field and read 50 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS50LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS50LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS50LE adds a field and reads 50 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS50LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S50LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S51LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS51LE tries to read 51 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS51LE() (int64, error) { return d.trySE(51, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S51LE reads 51 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S51LE() int64 {
|
|
|
|
v, err := d.trySE(51, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S51LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS51LE tries to add a field and read 51 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS51LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS51LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS51LE adds a field and reads 51 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS51LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S51LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S52LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS52LE tries to read 52 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS52LE() (int64, error) { return d.trySE(52, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S52LE reads 52 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S52LE() int64 {
|
|
|
|
v, err := d.trySE(52, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S52LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS52LE tries to add a field and read 52 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS52LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS52LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS52LE adds a field and reads 52 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS52LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S52LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S53LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS53LE tries to read 53 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS53LE() (int64, error) { return d.trySE(53, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S53LE reads 53 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S53LE() int64 {
|
|
|
|
v, err := d.trySE(53, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S53LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS53LE tries to add a field and read 53 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS53LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS53LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS53LE adds a field and reads 53 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS53LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S53LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S54LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS54LE tries to read 54 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS54LE() (int64, error) { return d.trySE(54, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S54LE reads 54 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S54LE() int64 {
|
|
|
|
v, err := d.trySE(54, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S54LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS54LE tries to add a field and read 54 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS54LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS54LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS54LE adds a field and reads 54 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS54LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S54LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S55LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS55LE tries to read 55 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS55LE() (int64, error) { return d.trySE(55, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S55LE reads 55 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S55LE() int64 {
|
|
|
|
v, err := d.trySE(55, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S55LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS55LE tries to add a field and read 55 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS55LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS55LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS55LE adds a field and reads 55 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS55LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S55LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S56LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS56LE tries to read 56 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS56LE() (int64, error) { return d.trySE(56, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S56LE reads 56 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S56LE() int64 {
|
|
|
|
v, err := d.trySE(56, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S56LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS56LE tries to add a field and read 56 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS56LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS56LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS56LE adds a field and reads 56 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS56LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S56LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S57LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS57LE tries to read 57 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS57LE() (int64, error) { return d.trySE(57, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S57LE reads 57 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S57LE() int64 {
|
|
|
|
v, err := d.trySE(57, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S57LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS57LE tries to add a field and read 57 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS57LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS57LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS57LE adds a field and reads 57 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS57LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S57LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S58LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS58LE tries to read 58 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS58LE() (int64, error) { return d.trySE(58, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S58LE reads 58 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S58LE() int64 {
|
|
|
|
v, err := d.trySE(58, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S58LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS58LE tries to add a field and read 58 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS58LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS58LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS58LE adds a field and reads 58 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS58LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S58LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S59LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS59LE tries to read 59 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS59LE() (int64, error) { return d.trySE(59, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S59LE reads 59 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S59LE() int64 {
|
|
|
|
v, err := d.trySE(59, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S59LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS59LE tries to add a field and read 59 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS59LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS59LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS59LE adds a field and reads 59 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS59LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S59LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S60LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS60LE tries to read 60 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS60LE() (int64, error) { return d.trySE(60, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S60LE reads 60 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S60LE() int64 {
|
|
|
|
v, err := d.trySE(60, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S60LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS60LE tries to add a field and read 60 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS60LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS60LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS60LE adds a field and reads 60 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS60LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S60LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S61LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS61LE tries to read 61 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS61LE() (int64, error) { return d.trySE(61, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S61LE reads 61 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S61LE() int64 {
|
|
|
|
v, err := d.trySE(61, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S61LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS61LE tries to add a field and read 61 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS61LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS61LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS61LE adds a field and reads 61 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS61LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S61LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S62LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS62LE tries to read 62 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS62LE() (int64, error) { return d.trySE(62, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S62LE reads 62 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S62LE() int64 {
|
|
|
|
v, err := d.trySE(62, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S62LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS62LE tries to add a field and read 62 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS62LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS62LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS62LE adds a field and reads 62 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS62LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S62LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S63LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS63LE tries to read 63 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS63LE() (int64, error) { return d.trySE(63, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S63LE reads 63 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S63LE() int64 {
|
|
|
|
v, err := d.trySE(63, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S63LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS63LE tries to add a field and read 63 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS63LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS63LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS63LE adds a field and reads 63 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS63LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S63LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S64LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS64LE tries to read 64 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS64LE() (int64, error) { return d.trySE(64, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S64LE reads 64 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S64LE() int64 {
|
|
|
|
v, err := d.trySE(64, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S64LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS64LE tries to add a field and read 64 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS64LE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS64LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS64LE adds a field and reads 64 bit signed integer in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS64LE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S64LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S8BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS8BE tries to read 8 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS8BE() (int64, error) { return d.trySE(8, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S8BE reads 8 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S8BE() int64 {
|
|
|
|
v, err := d.trySE(8, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S8BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS8BE tries to add a field and read 8 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS8BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS8BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS8BE adds a field and reads 8 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS8BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S8BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S9BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS9BE tries to read 9 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS9BE() (int64, error) { return d.trySE(9, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S9BE reads 9 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S9BE() int64 {
|
|
|
|
v, err := d.trySE(9, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S9BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS9BE tries to add a field and read 9 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS9BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS9BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS9BE adds a field and reads 9 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS9BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S9BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S10BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS10BE tries to read 10 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS10BE() (int64, error) { return d.trySE(10, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S10BE reads 10 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S10BE() int64 {
|
|
|
|
v, err := d.trySE(10, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S10BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS10BE tries to add a field and read 10 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS10BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS10BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS10BE adds a field and reads 10 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS10BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S10BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S11BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS11BE tries to read 11 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS11BE() (int64, error) { return d.trySE(11, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S11BE reads 11 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S11BE() int64 {
|
|
|
|
v, err := d.trySE(11, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S11BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS11BE tries to add a field and read 11 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS11BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS11BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS11BE adds a field and reads 11 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS11BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S11BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S12BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS12BE tries to read 12 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS12BE() (int64, error) { return d.trySE(12, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S12BE reads 12 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S12BE() int64 {
|
|
|
|
v, err := d.trySE(12, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S12BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS12BE tries to add a field and read 12 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS12BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS12BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS12BE adds a field and reads 12 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS12BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S12BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S13BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS13BE tries to read 13 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS13BE() (int64, error) { return d.trySE(13, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S13BE reads 13 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S13BE() int64 {
|
|
|
|
v, err := d.trySE(13, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S13BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS13BE tries to add a field and read 13 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS13BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS13BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS13BE adds a field and reads 13 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS13BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S13BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S14BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS14BE tries to read 14 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS14BE() (int64, error) { return d.trySE(14, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S14BE reads 14 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S14BE() int64 {
|
|
|
|
v, err := d.trySE(14, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S14BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS14BE tries to add a field and read 14 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS14BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS14BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS14BE adds a field and reads 14 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS14BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S14BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S15BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS15BE tries to read 15 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS15BE() (int64, error) { return d.trySE(15, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S15BE reads 15 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S15BE() int64 {
|
|
|
|
v, err := d.trySE(15, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S15BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS15BE tries to add a field and read 15 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS15BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS15BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS15BE adds a field and reads 15 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS15BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S15BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S16BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS16BE tries to read 16 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS16BE() (int64, error) { return d.trySE(16, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S16BE reads 16 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S16BE() int64 {
|
|
|
|
v, err := d.trySE(16, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S16BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS16BE tries to add a field and read 16 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS16BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS16BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS16BE adds a field and reads 16 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS16BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S16BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S17BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS17BE tries to read 17 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS17BE() (int64, error) { return d.trySE(17, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S17BE reads 17 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S17BE() int64 {
|
|
|
|
v, err := d.trySE(17, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S17BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS17BE tries to add a field and read 17 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS17BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS17BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS17BE adds a field and reads 17 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS17BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S17BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S18BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS18BE tries to read 18 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS18BE() (int64, error) { return d.trySE(18, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S18BE reads 18 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S18BE() int64 {
|
|
|
|
v, err := d.trySE(18, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S18BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS18BE tries to add a field and read 18 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS18BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS18BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS18BE adds a field and reads 18 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS18BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S18BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S19BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS19BE tries to read 19 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS19BE() (int64, error) { return d.trySE(19, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S19BE reads 19 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S19BE() int64 {
|
|
|
|
v, err := d.trySE(19, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S19BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS19BE tries to add a field and read 19 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS19BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS19BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS19BE adds a field and reads 19 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS19BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S19BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S20BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS20BE tries to read 20 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS20BE() (int64, error) { return d.trySE(20, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S20BE reads 20 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S20BE() int64 {
|
|
|
|
v, err := d.trySE(20, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S20BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS20BE tries to add a field and read 20 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS20BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS20BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS20BE adds a field and reads 20 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS20BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S20BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S21BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS21BE tries to read 21 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS21BE() (int64, error) { return d.trySE(21, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S21BE reads 21 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S21BE() int64 {
|
|
|
|
v, err := d.trySE(21, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S21BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS21BE tries to add a field and read 21 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS21BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS21BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS21BE adds a field and reads 21 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS21BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S21BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S22BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS22BE tries to read 22 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS22BE() (int64, error) { return d.trySE(22, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S22BE reads 22 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S22BE() int64 {
|
|
|
|
v, err := d.trySE(22, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S22BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS22BE tries to add a field and read 22 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS22BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS22BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS22BE adds a field and reads 22 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS22BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S22BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S23BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS23BE tries to read 23 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS23BE() (int64, error) { return d.trySE(23, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S23BE reads 23 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S23BE() int64 {
|
|
|
|
v, err := d.trySE(23, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S23BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS23BE tries to add a field and read 23 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS23BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS23BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS23BE adds a field and reads 23 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS23BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S23BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S24BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS24BE tries to read 24 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS24BE() (int64, error) { return d.trySE(24, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S24BE reads 24 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S24BE() int64 {
|
|
|
|
v, err := d.trySE(24, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S24BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS24BE tries to add a field and read 24 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS24BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS24BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS24BE adds a field and reads 24 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS24BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S24BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S25BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS25BE tries to read 25 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS25BE() (int64, error) { return d.trySE(25, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S25BE reads 25 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S25BE() int64 {
|
|
|
|
v, err := d.trySE(25, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S25BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS25BE tries to add a field and read 25 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS25BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS25BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS25BE adds a field and reads 25 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS25BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S25BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S26BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS26BE tries to read 26 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS26BE() (int64, error) { return d.trySE(26, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S26BE reads 26 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S26BE() int64 {
|
|
|
|
v, err := d.trySE(26, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S26BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS26BE tries to add a field and read 26 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS26BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS26BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS26BE adds a field and reads 26 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS26BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S26BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S27BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS27BE tries to read 27 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS27BE() (int64, error) { return d.trySE(27, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S27BE reads 27 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S27BE() int64 {
|
|
|
|
v, err := d.trySE(27, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S27BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS27BE tries to add a field and read 27 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS27BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS27BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS27BE adds a field and reads 27 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS27BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S27BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S28BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS28BE tries to read 28 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS28BE() (int64, error) { return d.trySE(28, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S28BE reads 28 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S28BE() int64 {
|
|
|
|
v, err := d.trySE(28, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S28BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS28BE tries to add a field and read 28 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS28BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS28BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS28BE adds a field and reads 28 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS28BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S28BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S29BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS29BE tries to read 29 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS29BE() (int64, error) { return d.trySE(29, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S29BE reads 29 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S29BE() int64 {
|
|
|
|
v, err := d.trySE(29, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S29BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS29BE tries to add a field and read 29 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS29BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS29BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS29BE adds a field and reads 29 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS29BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S29BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S30BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS30BE tries to read 30 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS30BE() (int64, error) { return d.trySE(30, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S30BE reads 30 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S30BE() int64 {
|
|
|
|
v, err := d.trySE(30, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S30BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS30BE tries to add a field and read 30 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS30BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS30BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS30BE adds a field and reads 30 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS30BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S30BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S31BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS31BE tries to read 31 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS31BE() (int64, error) { return d.trySE(31, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S31BE reads 31 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S31BE() int64 {
|
|
|
|
v, err := d.trySE(31, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S31BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS31BE tries to add a field and read 31 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS31BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS31BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS31BE adds a field and reads 31 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS31BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S31BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S32BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS32BE tries to read 32 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS32BE() (int64, error) { return d.trySE(32, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S32BE reads 32 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S32BE() int64 {
|
|
|
|
v, err := d.trySE(32, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S32BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS32BE tries to add a field and read 32 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS32BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS32BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS32BE adds a field and reads 32 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS32BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S32BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S33BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS33BE tries to read 33 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS33BE() (int64, error) { return d.trySE(33, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S33BE reads 33 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S33BE() int64 {
|
|
|
|
v, err := d.trySE(33, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S33BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS33BE tries to add a field and read 33 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS33BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS33BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS33BE adds a field and reads 33 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS33BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S33BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S34BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS34BE tries to read 34 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS34BE() (int64, error) { return d.trySE(34, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S34BE reads 34 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S34BE() int64 {
|
|
|
|
v, err := d.trySE(34, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S34BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS34BE tries to add a field and read 34 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS34BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS34BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS34BE adds a field and reads 34 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS34BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S34BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S35BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS35BE tries to read 35 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS35BE() (int64, error) { return d.trySE(35, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S35BE reads 35 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S35BE() int64 {
|
|
|
|
v, err := d.trySE(35, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S35BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS35BE tries to add a field and read 35 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS35BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS35BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS35BE adds a field and reads 35 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS35BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S35BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S36BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS36BE tries to read 36 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS36BE() (int64, error) { return d.trySE(36, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S36BE reads 36 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S36BE() int64 {
|
|
|
|
v, err := d.trySE(36, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S36BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS36BE tries to add a field and read 36 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS36BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS36BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS36BE adds a field and reads 36 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS36BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S36BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S37BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS37BE tries to read 37 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS37BE() (int64, error) { return d.trySE(37, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S37BE reads 37 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S37BE() int64 {
|
|
|
|
v, err := d.trySE(37, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S37BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS37BE tries to add a field and read 37 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS37BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS37BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS37BE adds a field and reads 37 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS37BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S37BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S38BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS38BE tries to read 38 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS38BE() (int64, error) { return d.trySE(38, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S38BE reads 38 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S38BE() int64 {
|
|
|
|
v, err := d.trySE(38, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S38BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS38BE tries to add a field and read 38 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS38BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS38BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS38BE adds a field and reads 38 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS38BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S38BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S39BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS39BE tries to read 39 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS39BE() (int64, error) { return d.trySE(39, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S39BE reads 39 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S39BE() int64 {
|
|
|
|
v, err := d.trySE(39, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S39BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS39BE tries to add a field and read 39 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS39BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS39BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS39BE adds a field and reads 39 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS39BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S39BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S40BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS40BE tries to read 40 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS40BE() (int64, error) { return d.trySE(40, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S40BE reads 40 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S40BE() int64 {
|
|
|
|
v, err := d.trySE(40, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S40BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS40BE tries to add a field and read 40 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS40BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS40BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS40BE adds a field and reads 40 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS40BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S40BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S41BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS41BE tries to read 41 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS41BE() (int64, error) { return d.trySE(41, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S41BE reads 41 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S41BE() int64 {
|
|
|
|
v, err := d.trySE(41, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S41BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS41BE tries to add a field and read 41 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS41BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS41BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS41BE adds a field and reads 41 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS41BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S41BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S42BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS42BE tries to read 42 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS42BE() (int64, error) { return d.trySE(42, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S42BE reads 42 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S42BE() int64 {
|
|
|
|
v, err := d.trySE(42, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S42BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS42BE tries to add a field and read 42 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS42BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS42BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS42BE adds a field and reads 42 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS42BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S42BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S43BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS43BE tries to read 43 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS43BE() (int64, error) { return d.trySE(43, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S43BE reads 43 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S43BE() int64 {
|
|
|
|
v, err := d.trySE(43, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S43BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS43BE tries to add a field and read 43 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS43BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS43BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS43BE adds a field and reads 43 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS43BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S43BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S44BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS44BE tries to read 44 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS44BE() (int64, error) { return d.trySE(44, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S44BE reads 44 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S44BE() int64 {
|
|
|
|
v, err := d.trySE(44, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S44BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS44BE tries to add a field and read 44 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS44BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS44BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS44BE adds a field and reads 44 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS44BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S44BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S45BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS45BE tries to read 45 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS45BE() (int64, error) { return d.trySE(45, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S45BE reads 45 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S45BE() int64 {
|
|
|
|
v, err := d.trySE(45, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S45BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS45BE tries to add a field and read 45 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS45BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS45BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS45BE adds a field and reads 45 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS45BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S45BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S46BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS46BE tries to read 46 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS46BE() (int64, error) { return d.trySE(46, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S46BE reads 46 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S46BE() int64 {
|
|
|
|
v, err := d.trySE(46, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S46BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS46BE tries to add a field and read 46 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS46BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS46BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS46BE adds a field and reads 46 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS46BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S46BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S47BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS47BE tries to read 47 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS47BE() (int64, error) { return d.trySE(47, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S47BE reads 47 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S47BE() int64 {
|
|
|
|
v, err := d.trySE(47, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S47BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS47BE tries to add a field and read 47 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS47BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS47BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS47BE adds a field and reads 47 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS47BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S47BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S48BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS48BE tries to read 48 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS48BE() (int64, error) { return d.trySE(48, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S48BE reads 48 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S48BE() int64 {
|
|
|
|
v, err := d.trySE(48, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S48BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS48BE tries to add a field and read 48 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS48BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS48BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS48BE adds a field and reads 48 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS48BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S48BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S49BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS49BE tries to read 49 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS49BE() (int64, error) { return d.trySE(49, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S49BE reads 49 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S49BE() int64 {
|
|
|
|
v, err := d.trySE(49, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S49BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS49BE tries to add a field and read 49 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS49BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS49BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS49BE adds a field and reads 49 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS49BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S49BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S50BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS50BE tries to read 50 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS50BE() (int64, error) { return d.trySE(50, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S50BE reads 50 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S50BE() int64 {
|
|
|
|
v, err := d.trySE(50, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S50BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS50BE tries to add a field and read 50 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS50BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS50BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS50BE adds a field and reads 50 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS50BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S50BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S51BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS51BE tries to read 51 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS51BE() (int64, error) { return d.trySE(51, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S51BE reads 51 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S51BE() int64 {
|
|
|
|
v, err := d.trySE(51, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S51BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS51BE tries to add a field and read 51 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS51BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS51BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS51BE adds a field and reads 51 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS51BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S51BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S52BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS52BE tries to read 52 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS52BE() (int64, error) { return d.trySE(52, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S52BE reads 52 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S52BE() int64 {
|
|
|
|
v, err := d.trySE(52, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S52BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS52BE tries to add a field and read 52 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS52BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS52BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS52BE adds a field and reads 52 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS52BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S52BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S53BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS53BE tries to read 53 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS53BE() (int64, error) { return d.trySE(53, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S53BE reads 53 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S53BE() int64 {
|
|
|
|
v, err := d.trySE(53, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S53BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS53BE tries to add a field and read 53 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS53BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS53BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS53BE adds a field and reads 53 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS53BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S53BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S54BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS54BE tries to read 54 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS54BE() (int64, error) { return d.trySE(54, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S54BE reads 54 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S54BE() int64 {
|
|
|
|
v, err := d.trySE(54, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S54BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS54BE tries to add a field and read 54 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS54BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS54BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS54BE adds a field and reads 54 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS54BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S54BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S55BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS55BE tries to read 55 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS55BE() (int64, error) { return d.trySE(55, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S55BE reads 55 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S55BE() int64 {
|
|
|
|
v, err := d.trySE(55, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S55BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS55BE tries to add a field and read 55 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS55BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS55BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS55BE adds a field and reads 55 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS55BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S55BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S56BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS56BE tries to read 56 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS56BE() (int64, error) { return d.trySE(56, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S56BE reads 56 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S56BE() int64 {
|
|
|
|
v, err := d.trySE(56, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S56BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS56BE tries to add a field and read 56 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS56BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS56BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS56BE adds a field and reads 56 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS56BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S56BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S57BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS57BE tries to read 57 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS57BE() (int64, error) { return d.trySE(57, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S57BE reads 57 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S57BE() int64 {
|
|
|
|
v, err := d.trySE(57, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S57BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS57BE tries to add a field and read 57 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS57BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS57BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS57BE adds a field and reads 57 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS57BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S57BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S58BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS58BE tries to read 58 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS58BE() (int64, error) { return d.trySE(58, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S58BE reads 58 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S58BE() int64 {
|
|
|
|
v, err := d.trySE(58, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S58BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS58BE tries to add a field and read 58 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS58BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS58BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS58BE adds a field and reads 58 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS58BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S58BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S59BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS59BE tries to read 59 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS59BE() (int64, error) { return d.trySE(59, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S59BE reads 59 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S59BE() int64 {
|
|
|
|
v, err := d.trySE(59, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S59BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS59BE tries to add a field and read 59 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS59BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS59BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS59BE adds a field and reads 59 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS59BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S59BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S60BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS60BE tries to read 60 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS60BE() (int64, error) { return d.trySE(60, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S60BE reads 60 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S60BE() int64 {
|
|
|
|
v, err := d.trySE(60, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S60BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS60BE tries to add a field and read 60 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS60BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS60BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS60BE adds a field and reads 60 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS60BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S60BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S61BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS61BE tries to read 61 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS61BE() (int64, error) { return d.trySE(61, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S61BE reads 61 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S61BE() int64 {
|
|
|
|
v, err := d.trySE(61, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S61BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS61BE tries to add a field and read 61 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS61BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS61BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS61BE adds a field and reads 61 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS61BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S61BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S62BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS62BE tries to read 62 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS62BE() (int64, error) { return d.trySE(62, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S62BE reads 62 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S62BE() int64 {
|
|
|
|
v, err := d.trySE(62, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S62BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS62BE tries to add a field and read 62 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS62BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS62BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS62BE adds a field and reads 62 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS62BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S62BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S63BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS63BE tries to read 63 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS63BE() (int64, error) { return d.trySE(63, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S63BE reads 63 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S63BE() int64 {
|
|
|
|
v, err := d.trySE(63, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S63BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS63BE tries to add a field and read 63 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS63BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS63BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS63BE adds a field and reads 63 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS63BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S63BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader S64BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryS64BE tries to read 64 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryS64BE() (int64, error) { return d.trySE(64, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// S64BE reads 64 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) S64BE() int64 {
|
|
|
|
v, err := d.trySE(64, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "S64BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldS64BE tries to add a field and read 64 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldS64BE(name string, sfns ...ScalarFn) (int64, error) {
|
|
|
|
return d.TryFieldSFn(name, (*D).TryS64BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldS64BE adds a field and reads 64 bit signed integer in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldS64BE(name string, sfns ...ScalarFn) int64 {
|
|
|
|
return d.FieldSFn(name, (*D).S64BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Reader F
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryF tries to read nBit IEEE 754 float in current endian
|
|
|
|
func (d *D) TryF(nBits int) (float64, error) { return d.tryFE(nBits, d.Endian) }
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// F reads nBit IEEE 754 float in current endian
|
|
|
|
func (d *D) F(nBits int) float64 {
|
|
|
|
v, err := d.tryFE(nBits, d.Endian)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Op: "F", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldF tries to add a field and read nBit IEEE 754 float in current endian
|
|
|
|
func (d *D) TryFieldF(name string, nBits int, sfns ...ScalarFn) (float64, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryFE(nBits, d.Endian)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualF(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldF adds a field and reads nBit IEEE 754 float in current endian
|
|
|
|
func (d *D) FieldF(name string, nBits int, sfns ...ScalarFn) float64 {
|
|
|
|
v, err := d.TryFieldF(name, nBits, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Name: name, Op: "F", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Reader FE
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFE tries to read nBit IEEE 754 float in specified endian
|
|
|
|
func (d *D) TryFE(nBits int, endian Endian) (float64, error) { return d.tryFE(nBits, endian) }
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FE reads nBit IEEE 754 float in specified endian
|
|
|
|
func (d *D) FE(nBits int, endian Endian) float64 {
|
|
|
|
v, err := d.tryFE(nBits, endian)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Op: "FE", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFE tries to add a field and read nBit IEEE 754 float in specified endian
|
|
|
|
func (d *D) TryFieldFE(name string, nBits int, endian Endian, sfns ...ScalarFn) (float64, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryFE(nBits, endian)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualF(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFE adds a field and reads nBit IEEE 754 float in specified endian
|
|
|
|
func (d *D) FieldFE(name string, nBits int, endian Endian, sfns ...ScalarFn) float64 {
|
|
|
|
v, err := d.TryFieldFE(name, nBits, endian, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Name: name, Op: "FE", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader F16
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryF16 tries to read 16 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryF16() (float64, error) { return d.tryFE(16, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// F16 reads 16 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) F16() float64 {
|
|
|
|
v, err := d.tryFE(16, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "F16", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldF16 tries to add a field and read 16 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldF16(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryF16, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldF16 adds a field and reads 16 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldF16(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).F16, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader F32
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryF32 tries to read 32 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryF32() (float64, error) { return d.tryFE(32, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// F32 reads 32 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) F32() float64 {
|
|
|
|
v, err := d.tryFE(32, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "F32", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldF32 tries to add a field and read 32 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldF32(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryF32, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldF32 adds a field and reads 32 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldF32(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).F32, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader F64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryF64 tries to read 64 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryF64() (float64, error) { return d.tryFE(64, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// F64 reads 64 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) F64() float64 {
|
|
|
|
v, err := d.tryFE(64, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "F64", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldF64 tries to add a field and read 64 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldF64(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryF64, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldF64 adds a field and reads 64 bit IEEE 754 float in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldF64(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).F64, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader F16LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryF16LE tries to read 16 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryF16LE() (float64, error) { return d.tryFE(16, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// F16LE reads 16 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) F16LE() float64 {
|
|
|
|
v, err := d.tryFE(16, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "F16LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldF16LE tries to add a field and read 16 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldF16LE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryF16LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldF16LE adds a field and reads 16 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldF16LE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).F16LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader F32LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryF32LE tries to read 32 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryF32LE() (float64, error) { return d.tryFE(32, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// F32LE reads 32 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) F32LE() float64 {
|
|
|
|
v, err := d.tryFE(32, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "F32LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldF32LE tries to add a field and read 32 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldF32LE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryF32LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldF32LE adds a field and reads 32 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldF32LE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).F32LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader F64LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryF64LE tries to read 64 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryF64LE() (float64, error) { return d.tryFE(64, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// F64LE reads 64 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) F64LE() float64 {
|
|
|
|
v, err := d.tryFE(64, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "F64LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldF64LE tries to add a field and read 64 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldF64LE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryF64LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldF64LE adds a field and reads 64 bit IEEE 754 float in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldF64LE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).F64LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader F16BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryF16BE tries to read 16 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryF16BE() (float64, error) { return d.tryFE(16, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// F16BE reads 16 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) F16BE() float64 {
|
|
|
|
v, err := d.tryFE(16, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "F16BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldF16BE tries to add a field and read 16 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldF16BE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryF16BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldF16BE adds a field and reads 16 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldF16BE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).F16BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader F32BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryF32BE tries to read 32 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryF32BE() (float64, error) { return d.tryFE(32, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// F32BE reads 32 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) F32BE() float64 {
|
|
|
|
v, err := d.tryFE(32, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "F32BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldF32BE tries to add a field and read 32 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldF32BE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryF32BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldF32BE adds a field and reads 32 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldF32BE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).F32BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader F64BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryF64BE tries to read 64 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryF64BE() (float64, error) { return d.tryFE(64, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// F64BE reads 64 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) F64BE() float64 {
|
|
|
|
v, err := d.tryFE(64, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "F64BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldF64BE tries to add a field and read 64 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldF64BE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryF64BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldF64BE adds a field and reads 64 bit IEEE 754 float in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldF64BE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).F64BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Reader FP
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFP tries to read nBits fixed-point number in current endian
|
2021-11-19 17:24:53 +03:00
|
|
|
func (d *D) TryFP(nBits int, fBits int) (float64, error) { return d.tryFPE(nBits, fBits, d.Endian) }
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FP reads nBits fixed-point number in current endian
|
2021-11-19 17:24:53 +03:00
|
|
|
func (d *D) FP(nBits int, fBits int) float64 {
|
2021-11-17 18:13:10 +03:00
|
|
|
v, err := d.tryFPE(nBits, fBits, d.Endian)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Op: "FP", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFP tries to add a field and read nBits fixed-point number in current endian
|
2021-11-19 17:24:53 +03:00
|
|
|
func (d *D) TryFieldFP(name string, nBits int, fBits int, sfns ...ScalarFn) (float64, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryFPE(nBits, fBits, d.Endian)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualF(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFP adds a field and reads nBits fixed-point number in current endian
|
2021-11-19 17:24:53 +03:00
|
|
|
func (d *D) FieldFP(name string, nBits int, fBits int, sfns ...ScalarFn) float64 {
|
2021-11-17 18:13:10 +03:00
|
|
|
v, err := d.TryFieldFP(name, nBits, fBits, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Name: name, Op: "FP", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Reader FPE
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFPE tries to read nBits fixed-point number in specified endian
|
2021-11-19 17:24:53 +03:00
|
|
|
func (d *D) TryFPE(nBits int, fBits int, endian Endian) (float64, error) {
|
2021-11-17 18:13:10 +03:00
|
|
|
return d.tryFPE(nBits, fBits, endian)
|
|
|
|
}
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FPE reads nBits fixed-point number in specified endian
|
2021-11-19 17:24:53 +03:00
|
|
|
func (d *D) FPE(nBits int, fBits int, endian Endian) float64 {
|
2021-11-17 18:13:10 +03:00
|
|
|
v, err := d.tryFPE(nBits, fBits, endian)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Op: "FPE", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFPE tries to add a field and read nBits fixed-point number in specified endian
|
2021-11-19 17:24:53 +03:00
|
|
|
func (d *D) TryFieldFPE(name string, nBits int, fBits int, endian Endian, sfns ...ScalarFn) (float64, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryFPE(nBits, fBits, endian)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualF(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFPE adds a field and reads nBits fixed-point number in specified endian
|
2021-11-19 17:24:53 +03:00
|
|
|
func (d *D) FieldFPE(name string, nBits int, fBits int, endian Endian, sfns ...ScalarFn) float64 {
|
2021-11-17 18:13:10 +03:00
|
|
|
v, err := d.TryFieldFPE(name, nBits, fBits, endian, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Name: name, Op: "FPE", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader FP16
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFP16 tries to read 16 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFP16() (float64, error) { return d.tryFPE(16, 8, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FP16 reads 16 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FP16() float64 {
|
|
|
|
v, err := d.tryFPE(16, 8, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "FP16", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFP16 tries to add a field and read 16 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldFP16(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryFP16, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFP16 adds a field and reads 16 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldFP16(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).FP16, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader FP32
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFP32 tries to read 32 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFP32() (float64, error) { return d.tryFPE(32, 16, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FP32 reads 32 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FP32() float64 {
|
|
|
|
v, err := d.tryFPE(32, 16, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "FP32", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFP32 tries to add a field and read 32 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldFP32(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryFP32, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFP32 adds a field and reads 32 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldFP32(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).FP32, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader FP64
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFP64 tries to read 64 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFP64() (float64, error) { return d.tryFPE(64, 32, d.Endian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FP64 reads 64 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FP64() float64 {
|
|
|
|
v, err := d.tryFPE(64, 32, d.Endian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "FP64", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFP64 tries to add a field and read 64 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldFP64(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryFP64, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFP64 adds a field and reads 64 bit fixed-point number in current endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldFP64(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).FP64, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader FP16LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFP16LE tries to read 16 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFP16LE() (float64, error) { return d.tryFPE(16, 8, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FP16LE reads 16 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FP16LE() float64 {
|
|
|
|
v, err := d.tryFPE(16, 8, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "FP16LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFP16LE tries to add a field and read 16 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldFP16LE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryFP16LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFP16LE adds a field and reads 16 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldFP16LE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).FP16LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader FP32LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFP32LE tries to read 32 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFP32LE() (float64, error) { return d.tryFPE(32, 16, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FP32LE reads 32 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FP32LE() float64 {
|
|
|
|
v, err := d.tryFPE(32, 16, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "FP32LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFP32LE tries to add a field and read 32 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldFP32LE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryFP32LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFP32LE adds a field and reads 32 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldFP32LE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).FP32LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader FP64LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFP64LE tries to read 64 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFP64LE() (float64, error) { return d.tryFPE(64, 32, LittleEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FP64LE reads 64 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FP64LE() float64 {
|
|
|
|
v, err := d.tryFPE(64, 32, LittleEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "FP64LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFP64LE tries to add a field and read 64 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldFP64LE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryFP64LE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFP64LE adds a field and reads 64 bit fixed-point number in little-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldFP64LE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).FP64LE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader FP16BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFP16BE tries to read 16 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFP16BE() (float64, error) { return d.tryFPE(16, 8, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FP16BE reads 16 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FP16BE() float64 {
|
|
|
|
v, err := d.tryFPE(16, 8, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "FP16BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFP16BE tries to add a field and read 16 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldFP16BE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryFP16BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFP16BE adds a field and reads 16 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldFP16BE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).FP16BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader FP32BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFP32BE tries to read 32 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFP32BE() (float64, error) { return d.tryFPE(32, 16, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FP32BE reads 32 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FP32BE() float64 {
|
|
|
|
v, err := d.tryFPE(32, 16, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "FP32BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFP32BE tries to add a field and read 32 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldFP32BE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryFP32BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFP32BE adds a field and reads 32 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldFP32BE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).FP32BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader FP64BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFP64BE tries to read 64 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFP64BE() (float64, error) { return d.tryFPE(64, 32, BigEndian) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FP64BE reads 64 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FP64BE() float64 {
|
|
|
|
v, err := d.tryFPE(64, 32, BigEndian)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "FP64BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldFP64BE tries to add a field and read 64 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldFP64BE(name string, sfns ...ScalarFn) (float64, error) {
|
|
|
|
return d.TryFieldFFn(name, (*D).TryFP64BE, sfns...)
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldFP64BE adds a field and reads 64 bit fixed-point number in big-endian
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldFP64BE(name string, sfns ...ScalarFn) float64 {
|
|
|
|
return d.FieldFFn(name, (*D).FP64BE, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader Unary
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryUnary tries to read unary integer using ov as "one" value
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryUnary(ov uint64) (uint64, error) { return d.tryUnary(ov) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Unary reads unary integer using ov as "one" value
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) Unary(ov uint64) uint64 {
|
|
|
|
v, err := d.tryUnary(ov)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "Unary", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldUnary tries to add a field and read unary integer using ov as "one" value
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldUnary(name string, ov uint64, sfns ...ScalarFn) (uint64, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryUnary(ov)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
return v.ActualU(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldUnary adds a field and reads unary integer using ov as "one" value
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldUnary(name string, ov uint64, sfns ...ScalarFn) uint64 {
|
|
|
|
v, err := d.TryFieldUnary(name, ov, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "Unary", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader UTF8
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryUTF8 tries to read nBytes bytes UTF8 string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryUTF8(nBytes int) (string, error) { return d.tryText(nBytes, UTF8BOM) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// UTF8 reads nBytes bytes UTF8 string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) UTF8(nBytes int) string {
|
|
|
|
v, err := d.tryText(nBytes, UTF8BOM)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "UTF8", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldUTF8 tries to add a field and read nBytes bytes UTF8 string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldUTF8(name string, nBytes int, sfns ...ScalarFn) (string, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryText(nBytes, UTF8BOM)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return "", err
|
|
|
|
}
|
|
|
|
return v.ActualStr(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldUTF8 adds a field and reads nBytes bytes UTF8 string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldUTF8(name string, nBytes int, sfns ...ScalarFn) string {
|
|
|
|
v, err := d.TryFieldUTF8(name, nBytes, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "UTF8", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader UTF16
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryUTF16 tries to read nBytes bytes UTF16 string, default big-endian and accepts BOM
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryUTF16(nBytes int) (string, error) { return d.tryText(nBytes, UTF16BOM) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// UTF16 reads nBytes bytes UTF16 string, default big-endian and accepts BOM
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) UTF16(nBytes int) string {
|
|
|
|
v, err := d.tryText(nBytes, UTF16BOM)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "UTF16", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldUTF16 tries to add a field and read nBytes bytes UTF16 string, default big-endian and accepts BOM
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldUTF16(name string, nBytes int, sfns ...ScalarFn) (string, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryText(nBytes, UTF16BOM)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return "", err
|
|
|
|
}
|
|
|
|
return v.ActualStr(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldUTF16 adds a field and reads nBytes bytes UTF16 string, default big-endian and accepts BOM
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldUTF16(name string, nBytes int, sfns ...ScalarFn) string {
|
|
|
|
v, err := d.TryFieldUTF16(name, nBytes, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "UTF16", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader UTF16LE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryUTF16LE tries to read nBytes bytes UTF16 little-endian string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryUTF16LE(nBytes int) (string, error) { return d.tryText(nBytes, UTF16LE) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// UTF16LE reads nBytes bytes UTF16 little-endian string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) UTF16LE(nBytes int) string {
|
|
|
|
v, err := d.tryText(nBytes, UTF16LE)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "UTF16LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldUTF16LE tries to add a field and read nBytes bytes UTF16 little-endian string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldUTF16LE(name string, nBytes int, sfns ...ScalarFn) (string, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryText(nBytes, UTF16LE)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return "", err
|
|
|
|
}
|
|
|
|
return v.ActualStr(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldUTF16LE adds a field and reads nBytes bytes UTF16 little-endian string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldUTF16LE(name string, nBytes int, sfns ...ScalarFn) string {
|
|
|
|
v, err := d.TryFieldUTF16LE(name, nBytes, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "UTF16LE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader UTF16BE
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryUTF16BE tries to read nBytes bytes UTF16 big-endian string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryUTF16BE(nBytes int) (string, error) { return d.tryText(nBytes, UTF16BE) }
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// UTF16BE reads nBytes bytes UTF16 big-endian string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) UTF16BE(nBytes int) string {
|
|
|
|
v, err := d.tryText(nBytes, UTF16BE)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "UTF16BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldUTF16BE tries to add a field and read nBytes bytes UTF16 big-endian string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) TryFieldUTF16BE(name string, nBytes int, sfns ...ScalarFn) (string, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryText(nBytes, UTF16BE)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return "", err
|
|
|
|
}
|
|
|
|
return v.ActualStr(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldUTF16BE adds a field and reads nBytes bytes UTF16 big-endian string
|
2021-11-05 17:04:26 +03:00
|
|
|
func (d *D) FieldUTF16BE(name string, nBytes int, sfns ...ScalarFn) string {
|
|
|
|
v, err := d.TryFieldUTF16BE(name, nBytes, sfns...)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Name: name, Op: "UTF16BE", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader UTF8ShortString
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryUTF8ShortString tries to read one byte length fixed UTF8 string
|
|
|
|
func (d *D) TryUTF8ShortString() (string, error) { return d.tryTextLenPrefixed(8, -1, UTF8BOM) }
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// UTF8ShortString reads one byte length fixed UTF8 string
|
|
|
|
func (d *D) UTF8ShortString() string {
|
|
|
|
v, err := d.tryTextLenPrefixed(8, -1, UTF8BOM)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "UTF8ShortString", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldUTF8ShortString tries to add a field and read one byte length fixed UTF8 string
|
|
|
|
func (d *D) TryFieldUTF8ShortString(name string, sfns ...ScalarFn) (string, error) {
|
|
|
|
return d.TryFieldStrFn(name, (*D).TryUTF8ShortString, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// FieldUTF8ShortString adds a field and reads one byte length fixed UTF8 string
|
|
|
|
func (d *D) FieldUTF8ShortString(name string, sfns ...ScalarFn) string {
|
|
|
|
return d.FieldStrFn(name, (*D).UTF8ShortString, sfns...)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reader UTF8ShortStringFixedLen
|
|
|
|
|
|
|
|
// TryUTF8ShortStringFixedLen tries to read fixedBytes bytes long one byte length prefixed UTF8 string
|
|
|
|
func (d *D) TryUTF8ShortStringFixedLen(fixedBytes int) (string, error) {
|
|
|
|
return d.tryTextLenPrefixed(8, fixedBytes, UTF8BOM)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UTF8ShortStringFixedLen reads fixedBytes bytes long one byte length prefixed UTF8 string
|
|
|
|
func (d *D) UTF8ShortStringFixedLen(fixedBytes int) string {
|
|
|
|
v, err := d.tryTextLenPrefixed(8, fixedBytes, UTF8BOM)
|
|
|
|
if err != nil {
|
|
|
|
panic(IOError{Err: err, Op: "UTF8ShortStringFixedLen", Pos: d.Pos()})
|
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
|
|
|
// TryFieldUTF8ShortStringFixedLen tries to add a field and read fixedBytes bytes long one byte length prefixed UTF8 string
|
|
|
|
func (d *D) TryFieldUTF8ShortStringFixedLen(name string, fixedBytes int, sfns ...ScalarFn) (string, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryTextLenPrefixed(8, fixedBytes, UTF8BOM)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return "", err
|
|
|
|
}
|
|
|
|
return v.ActualStr(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldUTF8ShortStringFixedLen adds a field and reads fixedBytes bytes long one byte length prefixed UTF8 string
|
|
|
|
func (d *D) FieldUTF8ShortStringFixedLen(name string, fixedBytes int, sfns ...ScalarFn) string {
|
|
|
|
v, err := d.TryFieldUTF8ShortStringFixedLen(name, fixedBytes, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Name: name, Op: "UTF8ShortStringFixedLen", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Reader UTF8Null
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryUTF8Null tries to read null terminated UTF8 string
|
|
|
|
func (d *D) TryUTF8Null() (string, error) { return d.tryTextNull(1, UTF8BOM) }
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// UTF8Null reads null terminated UTF8 string
|
|
|
|
func (d *D) UTF8Null() string {
|
|
|
|
v, err := d.tryTextNull(1, UTF8BOM)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Op: "UTF8Null", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldUTF8Null tries to add a field and read null terminated UTF8 string
|
|
|
|
func (d *D) TryFieldUTF8Null(name string, sfns ...ScalarFn) (string, error) {
|
|
|
|
return d.TryFieldStrFn(name, (*D).TryUTF8Null, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldUTF8Null adds a field and reads null terminated UTF8 string
|
|
|
|
func (d *D) FieldUTF8Null(name string, sfns ...ScalarFn) string {
|
|
|
|
return d.FieldStrFn(name, (*D).UTF8Null, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// Reader UTF8NullFixedLen
|
2021-11-05 17:04:26 +03:00
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryUTF8NullFixedLen tries to read fixedBytes bytes long null terminated UTF8 string
|
|
|
|
func (d *D) TryUTF8NullFixedLen(fixedBytes int) (string, error) {
|
|
|
|
return d.tryTextNullLen(fixedBytes, UTF8BOM)
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// UTF8NullFixedLen reads fixedBytes bytes long null terminated UTF8 string
|
|
|
|
func (d *D) UTF8NullFixedLen(fixedBytes int) string {
|
|
|
|
v, err := d.tryTextNullLen(fixedBytes, UTF8BOM)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Op: "UTF8NullFixedLen", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// TryFieldUTF8NullFixedLen tries to add a field and read fixedBytes bytes long null terminated UTF8 string
|
|
|
|
func (d *D) TryFieldUTF8NullFixedLen(name string, fixedBytes int, sfns ...ScalarFn) (string, error) {
|
2021-11-21 15:08:18 +03:00
|
|
|
v, err := d.TryFieldScalar(name, func(s Scalar) (Scalar, error) {
|
|
|
|
v, err := d.tryTextNullLen(fixedBytes, UTF8BOM)
|
|
|
|
s.Actual = v
|
|
|
|
return s, err
|
|
|
|
}, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
|
|
|
return "", err
|
|
|
|
}
|
|
|
|
return v.ActualStr(), err
|
|
|
|
}
|
|
|
|
|
2021-11-17 18:13:10 +03:00
|
|
|
// FieldUTF8NullFixedLen adds a field and reads fixedBytes bytes long null terminated UTF8 string
|
|
|
|
func (d *D) FieldUTF8NullFixedLen(name string, fixedBytes int, sfns ...ScalarFn) string {
|
|
|
|
v, err := d.TryFieldUTF8NullFixedLen(name, fixedBytes, sfns...)
|
2021-11-05 17:04:26 +03:00
|
|
|
if err != nil {
|
2021-11-17 18:13:10 +03:00
|
|
|
panic(IOError{Err: err, Name: name, Op: "UTF8NullFixedLen", Pos: d.Pos()})
|
2021-11-05 17:04:26 +03:00
|
|
|
}
|
|
|
|
return v
|
|
|
|
}
|