internal

package
v0.3.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const IS_64_BIT = uint64(^uintptr(0)) == ^uint64(0)

Variables

This section is empty.

Functions

func AtaSwap16

func AtaSwap16(x uint16) uint16

func AtaSwap32

func AtaSwap32(x uint32) uint32

func AtaSwapWordEndian

func AtaSwapWordEndian(input []byte)

func GetStrucOptions

func GetStrucOptions() *struc.Options

func GetStrucOptionsWithBigEndian

func GetStrucOptionsWithBigEndian() *struc.Options

func IsAlignedPointer

func IsAlignedPointer(align int, pointer uintptr) bool

func Ternary

func Ternary[T any](statement bool, a T, b T) T

Types

type AlignedBuffer

type AlignedBuffer struct {
	io.Reader
	io.Writer
	// contains filtered or unexported fields
}

func NewAlignedBuffer

func NewAlignedBuffer(align int, size int) *AlignedBuffer

func (*AlignedBuffer) GetBuffer

func (b *AlignedBuffer) GetBuffer() []byte

func (*AlignedBuffer) GetCapacity

func (b *AlignedBuffer) GetCapacity() int

func (*AlignedBuffer) GetPointer

func (b *AlignedBuffer) GetPointer() *byte

func (*AlignedBuffer) GetPos added in v0.3.0

func (b *AlignedBuffer) GetPos() int

func (*AlignedBuffer) Read

func (b *AlignedBuffer) Read(p []byte) (n int, err error)

func (*AlignedBuffer) Reset added in v0.3.0

func (b *AlignedBuffer) Reset()

func (*AlignedBuffer) ResetRead

func (b *AlignedBuffer) ResetRead()

func (*AlignedBuffer) ResetWrite

func (b *AlignedBuffer) ResetWrite()

func (*AlignedBuffer) SetLimit

func (b *AlignedBuffer) SetLimit(limit int)

func (*AlignedBuffer) SetReadPos added in v0.3.0

func (b *AlignedBuffer) SetReadPos(offset int)

func (*AlignedBuffer) SetWritePos added in v0.3.0

func (b *AlignedBuffer) SetWritePos(offset int)

func (*AlignedBuffer) Write

func (b *AlignedBuffer) Write(p []byte) (n int, err error)

func (*AlignedBuffer) WriteByte added in v0.3.0

func (b *AlignedBuffer) WriteByte(p byte) (err error)

type WrappedBuffer

type WrappedBuffer struct {
	io.Reader
	// contains filtered or unexported fields
}

func NewWrappedBuffer

func NewWrappedBuffer(buffer []byte) *WrappedBuffer

func (*WrappedBuffer) GetCapacity

func (b *WrappedBuffer) GetCapacity() int

func (*WrappedBuffer) Read

func (b *WrappedBuffer) Read(p []byte) (n int, err error)

func (*WrappedBuffer) ResetRead

func (b *WrappedBuffer) ResetRead()

func (*WrappedBuffer) ResetWrite

func (b *WrappedBuffer) ResetWrite()

func (*WrappedBuffer) SetLimit

func (b *WrappedBuffer) SetLimit(limit int)

func (*WrappedBuffer) Write

func (b *WrappedBuffer) Write(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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