binary

package
v0.0.0-...-d3a9360 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BooleanFalseByte = 0x80
	BooleanTrueByte  = 0x81
	Reserved82Byte   = 0x82
	Reserved83Byte   = 0x83
	EndByte          = 0x84
	AnnotationByte   = 0x85
	EmbeddedByte     = 0x86
	DoubleByte       = 0x87
	// up to 0xAF
	SignedIntegerByte = 0xB0
	StringByte        = 0xB1
	ByteStringByte    = 0xB2
	SymbolByte        = 0xB3
	RecordByte        = 0xB4
	SequenceByte      = 0xB5
	SetByte           = 0xB6
	DictionaryByte    = 0xB7
	ReservedB8Byte    = 0xB8
	ReservedB9Byte    = 0xB9
	ReservedBAByte    = 0xBA
	ReservedBBByte    = 0xBB
	ReservedBCByte    = 0xBC
	ReservedBDByte    = 0xBD
	ReservedBEByte    = 0xBE
	ReservedBFByte    = 0xBF
)

Variables

This section is empty.

Functions

func FromPreserves

func FromPreserves(v preserves.Value) preserves.Value

func ReadEndByte

func ReadEndByte(ir io.Reader) (ok bool, n int, err error)

func ReadUvarint

func ReadUvarint(r io.Reader) (l uint64, n int, err error)

func ToPreserves

func ToPreserves(v preserves.Value) preserves.Value

Types

type Annotation

type Annotation struct {
	preserves.Annotation
}

func NewAnnotation

func NewAnnotation(value, annotatedValue preserves.Value) *Annotation

func (*Annotation) Cmp

func (a *Annotation) Cmp(y preserves.Value) int

func (*Annotation) Equal

func (a *Annotation) Equal(y preserves.Value) bool

func (*Annotation) MarshalBinary

func (a *Annotation) MarshalBinary() (data []byte, err error)

func (*Annotation) New

func (a *Annotation) New() preserves.Value

func (*Annotation) ReadFrom

func (a *Annotation) ReadFrom(rd io.Reader) (n int64, err error)

func (*Annotation) WriteTo

func (a *Annotation) WriteTo(w io.Writer) (n int64, err error)

type BinaryParser

type BinaryParser struct {
	Result preserves.Value
}

func (*BinaryParser) ReadFrom

func (bp *BinaryParser) ReadFrom(ir io.Reader) (n int64, err error)

type Boolean

type Boolean struct {
	preserves.Boolean
}

func (*Boolean) Cmp

func (b *Boolean) Cmp(y preserves.Value) int

func (*Boolean) Equal

func (b *Boolean) Equal(y preserves.Value) bool

func (*Boolean) MarshalBinary

func (b *Boolean) MarshalBinary() (data []byte, err error)

func (*Boolean) New

func (b *Boolean) New() preserves.Value

func (*Boolean) ReadFrom

func (b *Boolean) ReadFrom(ir io.Reader) (n int64, err error)

func (*Boolean) WriteTo

func (b *Boolean) WriteTo(w io.Writer) (n int64, err error)

type ByteLenReader

type ByteLenReader struct {
	io.ByteReader
	// contains filtered or unexported fields
}

func (*ByteLenReader) ReadByte

func (b *ByteLenReader) ReadByte() (d byte, err error)

type ByteString

type ByteString struct {
	preserves.ByteString
}

func (*ByteString) Cmp

func (b *ByteString) Cmp(y preserves.Value) int

func (*ByteString) Equal

func (b *ByteString) Equal(y preserves.Value) bool

func (*ByteString) MarshalBinary

func (bs *ByteString) MarshalBinary() (data []byte, err error)

func (*ByteString) New

func (bs *ByteString) New() preserves.Value

func (*ByteString) ReadFrom

func (bs *ByteString) ReadFrom(r io.Reader) (n int64, err error)

func (*ByteString) WriteTo

func (bs *ByteString) WriteTo(w io.Writer) (n int64, err error)

type Dictionary

type Dictionary struct {
	preserves.Dictionary
}

func NewDictionary

func NewDictionary(pairs ...struct{ key, field preserves.Value }) *Dictionary

func (*Dictionary) Cmp

func (d *Dictionary) Cmp(y preserves.Value) int

func (*Dictionary) Equal

func (d *Dictionary) Equal(y preserves.Value) bool

func (*Dictionary) MarshalBinary

func (d *Dictionary) MarshalBinary() (data []byte, err error)

func (*Dictionary) New

func (d *Dictionary) New() preserves.Value

func (*Dictionary) ReadFrom

func (d *Dictionary) ReadFrom(rd io.Reader) (n int64, err error)

func (*Dictionary) WriteTo

func (d *Dictionary) WriteTo(w io.Writer) (n int64, err error)

type Double

type Double struct {
	preserves.Double
}

func (*Double) Cmp

func (d *Double) Cmp(y preserves.Value) int

func (*Double) Equal

func (d *Double) Equal(y preserves.Value) bool

func (*Double) MarshalBinary

func (d *Double) MarshalBinary() (data []byte, err error)

func (*Double) New

func (d *Double) New() preserves.Value

func (*Double) ReadFrom

func (d *Double) ReadFrom(r io.Reader) (n int64, err error)

func (*Double) WriteTo

func (d *Double) WriteTo(w io.Writer) (n int64, err error)

type Embedded

type Embedded struct {
	preserves.Embedded
}

func NewEmbedded

func NewEmbedded(v preserves.Value) *Embedded

func (*Embedded) Cmp

func (e *Embedded) Cmp(y preserves.Value) int

func (*Embedded) Equal

func (e *Embedded) Equal(y preserves.Value) bool

func (*Embedded) MarshalBinary

func (e *Embedded) MarshalBinary() (data []byte, err error)

func (*Embedded) New

func (e *Embedded) New() preserves.Value

func (*Embedded) ReadFrom

func (e *Embedded) ReadFrom(rd io.Reader) (n int64, err error)

func (*Embedded) WriteTo

func (e *Embedded) WriteTo(w io.Writer) (n int64, err error)

type Record

type Record struct {
	preserves.Record
}

func (*Record) Cmp

func (r *Record) Cmp(y preserves.Value) int

func (*Record) Equal

func (r *Record) Equal(y preserves.Value) bool

func (*Record) MarshalBinary

func (r *Record) MarshalBinary() (data []byte, err error)

func (*Record) New

func (r *Record) New() preserves.Value

func (*Record) ReadFrom

func (r *Record) ReadFrom(rd io.Reader) (n int64, err error)

func (*Record) WriteTo

func (r *Record) WriteTo(w io.Writer) (n int64, err error)

type Sequence

type Sequence struct {
	preserves.Sequence
}

func NewSequence

func NewSequence(v ...preserves.Value) *Sequence

func (*Sequence) Cmp

func (s *Sequence) Cmp(y preserves.Value) int

func (*Sequence) Equal

func (s *Sequence) Equal(y preserves.Value) bool

func (*Sequence) MarshalBinary

func (s *Sequence) MarshalBinary() (data []byte, err error)

func (*Sequence) New

func (s *Sequence) New() preserves.Value

func (*Sequence) ReadFrom

func (s *Sequence) ReadFrom(rd io.Reader) (n int64, err error)

func (*Sequence) WriteTo

func (s *Sequence) WriteTo(w io.Writer) (n int64, err error)

type Set

type Set struct {
	preserves.Set
}

func NewSet

func NewSet(v ...preserves.Value) *Set

func (*Set) Cmp

func (s *Set) Cmp(y preserves.Value) int

func (*Set) Equal

func (s *Set) Equal(y preserves.Value) bool

func (*Set) MarshalBinary

func (s *Set) MarshalBinary() (data []byte, err error)

func (*Set) New

func (s *Set) New() preserves.Value

func (*Set) ReadFrom

func (s *Set) ReadFrom(rd io.Reader) (n int64, err error)

func (*Set) WriteTo

func (s *Set) WriteTo(w io.Writer) (n int64, err error)

type SignedInteger

type SignedInteger struct {
	preserves.SignedInteger
}

func (*SignedInteger) Cmp

func (s *SignedInteger) Cmp(y preserves.Value) int

func (*SignedInteger) Equal

func (s *SignedInteger) Equal(y preserves.Value) bool

func (*SignedInteger) MarshalBinary

func (s *SignedInteger) MarshalBinary() (data []byte, err error)

func (*SignedInteger) New

func (s *SignedInteger) New() preserves.Value

func (*SignedInteger) ReadFrom

func (s *SignedInteger) ReadFrom(r io.Reader) (n int64, err error)

func (*SignedInteger) WriteTo

func (s *SignedInteger) WriteTo(w io.Writer) (n int64, err error)

type String

type String struct {
	preserves.Pstring
}

func (*String) Cmp

func (s *String) Cmp(y preserves.Value) int

func (*String) Equal

func (s *String) Equal(y preserves.Value) bool

func (*String) MarshalBinary

func (s *String) MarshalBinary() (data []byte, err error)

func (*String) New

func (s *String) New() preserves.Value

func (*String) ReadFrom

func (s *String) ReadFrom(r io.Reader) (n int64, err error)

func (*String) WriteTo

func (s *String) WriteTo(w io.Writer) (n int64, err error)

type Symbol

type Symbol struct {
	preserves.Symbol
}

func (*Symbol) Cmp

func (s *Symbol) Cmp(y preserves.Value) int

func (*Symbol) Equal

func (s *Symbol) Equal(y preserves.Value) bool

func (*Symbol) MarshalBinary

func (s *Symbol) MarshalBinary() (data []byte, err error)

func (*Symbol) New

func (s *Symbol) New() preserves.Value

func (*Symbol) ReadFrom

func (s *Symbol) ReadFrom(r io.Reader) (n int64, err error)

func (*Symbol) WriteTo

func (s *Symbol) WriteTo(w io.Writer) (n int64, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL