byte_operations

package
v1.19.10 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package byte_operations provides helper functions to (un-) marshal objects from or into a buffer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteOperations

type ByteOperations struct {
	Position uint64
	Buffer   []byte
}

func (*ByteOperations) CopyBytesFromBuffer

func (bo *ByteOperations) CopyBytesFromBuffer(length uint64, out []byte) ([]byte, error)

func (*ByteOperations) CopyBytesToBuffer

func (bo *ByteOperations) CopyBytesToBuffer(copyBytes []byte) error

func (*ByteOperations) CopyBytesToBufferWithUint32LengthIndicator added in v1.18.0

func (bo *ByteOperations) CopyBytesToBufferWithUint32LengthIndicator(copyBytes []byte) error

Writes a uint32 length indicator about the buffer that's about to follow, then writes the buffer itself

func (*ByteOperations) CopyBytesToBufferWithUint64LengthIndicator added in v1.18.0

func (bo *ByteOperations) CopyBytesToBufferWithUint64LengthIndicator(copyBytes []byte) error

Writes a uint64 length indicator about the buffer that's about to follow, then writes the buffer itself

func (*ByteOperations) DiscardBytesFromBufferWithUint32LengthIndicator added in v1.18.0

func (bo *ByteOperations) DiscardBytesFromBufferWithUint32LengthIndicator() uint32

func (*ByteOperations) DiscardBytesFromBufferWithUint64LengthIndicator added in v1.18.0

func (bo *ByteOperations) DiscardBytesFromBufferWithUint64LengthIndicator() uint64

func (*ByteOperations) MoveBufferPositionForward

func (bo *ByteOperations) MoveBufferPositionForward(length uint64)

func (*ByteOperations) MoveBufferToAbsolutePosition added in v1.18.0

func (bo *ByteOperations) MoveBufferToAbsolutePosition(pos uint64)

func (*ByteOperations) ReadBytesFromBuffer added in v1.18.0

func (bo *ByteOperations) ReadBytesFromBuffer(length uint64) []byte

func (*ByteOperations) ReadBytesFromBufferWithUint32LengthIndicator added in v1.18.0

func (bo *ByteOperations) ReadBytesFromBufferWithUint32LengthIndicator() []byte

func (*ByteOperations) ReadBytesFromBufferWithUint64LengthIndicator added in v1.18.0

func (bo *ByteOperations) ReadBytesFromBufferWithUint64LengthIndicator() []byte

func (*ByteOperations) ReadUint16

func (bo *ByteOperations) ReadUint16() uint16

func (*ByteOperations) ReadUint32

func (bo *ByteOperations) ReadUint32() uint32

func (*ByteOperations) ReadUint64

func (bo *ByteOperations) ReadUint64() uint64

func (*ByteOperations) ReadUint8 added in v1.18.1

func (bo *ByteOperations) ReadUint8() uint8

func (*ByteOperations) WriteByte

func (bo *ByteOperations) WriteByte(b byte)

func (*ByteOperations) WriteUint16

func (bo *ByteOperations) WriteUint16(value uint16)

func (*ByteOperations) WriteUint32

func (bo *ByteOperations) WriteUint32(value uint32)

func (*ByteOperations) WriteUint64

func (bo *ByteOperations) WriteUint64(value uint64)

Jump to

Keyboard shortcuts

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