fastbuf

package
v0.0.0-...-3a06bfb Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Concat

func Concat(a, b []byte) []byte

Types

type R

type R struct {
	Buf []byte
}

func (*R) EOF

func (r *R) EOF() bool

func (*R) ReadArrayHeader

func (r *R) ReadArrayHeader() (uint32, error)

func (*R) ReadBool

func (r *R) ReadBool() (bool, error)

func (*R) ReadBytes

func (r *R) ReadBytes() ([]byte, error)

func (*R) ReadFloat64

func (r *R) ReadFloat64() (float64, error)

func (*R) ReadFull

func (r *R) ReadFull(p []byte) error

func (*R) ReadInt

func (r *R) ReadInt() (int, error)

func (*R) ReadInt64

func (r *R) ReadInt64() (int64, error)

func (*R) ReadIntArray

func (r *R) ReadIntArray() ([]int, error)

func (*R) ReadRat

func (r *R) ReadRat() (*big.Rat, error)

func (*R) ReadRaw

func (r *R) ReadRaw(size int) ([]byte, error)

func (*R) ReadString

func (r *R) ReadString() (string, error)

func (*R) ReadUint32Array

func (r *R) ReadUint32Array() ([]uint32, error)

func (*R) ReadUint8

func (r *R) ReadUint8() (byte, error)

func (*R) ReadUsize

func (r *R) ReadUsize() (uint64, error)

func (*R) SplitAt

func (r *R) SplitAt(n uint64) (r1, r2 R, err error)

type Size

type Size struct {
	// contains filtered or unexported fields
}

func (*Size) Build

func (b *Size) Build() W

func (*Size) Reserve

func (b *Size) Reserve(x int) *Size

func (*Size) ReserveBytes

func (b *Size) ReserveBytes(p []byte) *Size

func (*Size) ReserveString

func (b *Size) ReserveString(p string) *Size

type W

type W struct {
	// contains filtered or unexported fields
}

func (*W) AppendRaw

func (b *W) AppendRaw(p []byte) *W

func (*W) AppendUsize

func (b *W) AppendUsize(x uint64) *W

func (*W) Result

func (b *W) Result() []byte

func (*W) WriteArrayHeader

func (b *W) WriteArrayHeader(sz uint32) *W

func (*W) WriteBool

func (b *W) WriteBool(x bool) *W

func (*W) WriteBytes

func (b *W) WriteBytes(p []byte) *W

func (*W) WriteFloat64

func (b *W) WriteFloat64(x float64) *W

func (*W) WriteInt

func (b *W) WriteInt(x int) *W

func (*W) WriteInt64

func (b *W) WriteInt64(x int64) *W

func (*W) WriteIntArray

func (b *W) WriteIntArray(arr []int) *W

func (*W) WriteRat

func (b *W) WriteRat(x *big.Rat) *W

func (*W) WriteString

func (b *W) WriteString(s string) *W

func (*W) WriteUint32Array

func (b *W) WriteUint32Array(arr []uint32) *W

func (*W) WriteUint8

func (b *W) WriteUint8(x byte) *W

Jump to

Keyboard shortcuts

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