Versions in this module Expand all Collapse all v1 v1.2.7 Jan 29, 2023 v1.2.6 Jan 27, 2023 v1.2.5 Jan 24, 2023 v1.2.4 Jan 15, 2023 v1.2.3 Jan 15, 2023 v1.2.2 Jan 15, 2023 v1.2.1 Jan 14, 2023 Changes in this version + func Pack(w io.Writer, data interface{}) error + func PackWithOptions(w io.Writer, data interface{}, options *Options) error + func PackWithOrder(w io.Writer, data interface{}, order binary.ByteOrder) error + func Sizeof(data interface{}) (int, error) + func SizeofWithOptions(data interface{}, options *Options) (int, error) + func Unpack(r io.Reader, data interface{}) error + func UnpackWithOptions(r io.Reader, data interface{}, options *Options) error + func UnpackWithOrder(r io.Reader, data interface{}, order binary.ByteOrder) error + type Custom interface + Pack func(p []byte, opt *Options) (int, error) + Size func(opt *Options) int + String func() string + Unpack func(r io.Reader, length int, opt *Options) error + type Field struct + Array bool + Fields Fields + Index int + Len int + Name string + Order binary.ByteOrder + Ptr bool + Sizefrom []int + Sizeof []int + Slice bool + Type Type + func (f *Field) Pack(buf []byte, val reflect.Value, length int, options *Options) (int, error) + func (f *Field) Size(val reflect.Value, options *Options) int + func (f *Field) String() string + func (f *Field) Unpack(buf []byte, val reflect.Value, length int, options *Options) error + type Fields []*Field + func (f Fields) Pack(buf []byte, val reflect.Value, options *Options) (int, error) + func (f Fields) SetByteOrder(order binary.ByteOrder) + func (f Fields) Sizeof(val reflect.Value, options *Options) int + func (f Fields) String() string + func (f Fields) Unpack(r io.Reader, val reflect.Value, options *Options) error + type Float16 float64 + func (f *Float16) Pack(p []byte, opt *Options) (int, error) + func (f *Float16) Size(opt *Options) int + func (f *Float16) String() string + func (f *Float16) Unpack(r io.Reader, length int, opt *Options) error + type Off_t int64 + type Options struct + ByteAlign int + Order binary.ByteOrder + PtrSize int + func (o *Options) Validate() error + type Packer interface + Pack func(buf []byte, val reflect.Value, options *Options) (int, error) + Sizeof func(val reflect.Value, options *Options) int + String func() string + Unpack func(r io.Reader, val reflect.Value, options *Options) error + type Size_t uint64 + type Type int + const Bool + const CustomType + const Float32 + const Float64 + const Int + const Int16 + const Int32 + const Int64 + const Int8 + const Invalid + const OffType + const Pad + const Ptr + const SizeType + const String + const Struct + const Uint16 + const Uint32 + const Uint64 + const Uint8 + func (t Type) Resolve(options *Options) Type + func (t Type) Size() int + func (t Type) String() string