Versions in this module Expand all Collapse all v1 v1.3.1 Jan 14, 2020 v1.2.0 Sep 23, 2019 Changes in this version + const MaxObjectSize + const MaxSliceSize + var ErrObjectTooLarge = errors.New("encoded object exceeds size limit") + var ErrSliceTooLarge = errors.New("encoded slice is too large") + func DecInt64(b []byte) int64 + func DecUint64(b []byte) uint64 + func EncInt64(i int64) (b []byte) + func EncUint64(i uint64) (b []byte) + func Marshal(v interface{}) ([]byte, error) + func MarshalAll(vs ...interface{}) ([]byte, error) + func ReadFile(filename string, v interface{}) error + func ReadObject(r io.Reader, obj interface{}, maxLen uint64) error + func ReadPrefix(r io.Reader, maxLen uint64) ([]byte, error) + func Unmarshal(b []byte, v interface{}) error + func UnmarshalAll(b []byte, vs ...interface{}) error + func WriteFile(filename string, v interface{}) error + func WriteInt(w io.Writer, i int) error + func WriteObject(w io.Writer, v interface{}) error + func WritePrefix(w io.Writer, data []byte) error + func WriteUint64(w io.Writer, u uint64) error + type Decoder struct + func NewDecoder(r io.Reader) *Decoder + func (d *Decoder) Decode(v interface{}) (err error) + func (d *Decoder) DecodeAll(vs ...interface{}) error + func (d *Decoder) Read(p []byte) (int, error) + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (e *Encoder) Encode(v interface{}) error + func (e *Encoder) EncodeAll(vs ...interface{}) error + type SiaMarshaler interface + MarshalSia func(io.Writer) error + type SiaUnmarshaler interface + UnmarshalSia func(io.Reader) error