block

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0, MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MIN uint16 = 512
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlignedBytes

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

func FromBytes

func FromBytes(src []byte, blockSize BlockSize) *AlignedBytes

func NewAlignedBytes

func NewAlignedBytes(size int, blockSize BlockSize) *AlignedBytes

func (*AlignedBytes) Align

func (ab *AlignedBytes) Align() *AlignedBytes

func (*AlignedBytes) AlignResize

func (ab *AlignedBytes) AlignResize(newLen uint32)

func (*AlignedBytes) AsBytes

func (ab *AlignedBytes) AsBytes() []byte

func (*AlignedBytes) BlockSize

func (ab *AlignedBytes) BlockSize() BlockSize

func (*AlignedBytes) Capacity

func (ab *AlignedBytes) Capacity() uint64

func (*AlignedBytes) Len

func (ab *AlignedBytes) Len() uint32

func (*AlignedBytes) Resize

func (ab *AlignedBytes) Resize(newLen uint32)

func (*AlignedBytes) Truncate

func (ab *AlignedBytes) Truncate(len uint32)

type BlockSize

type BlockSize uint16

func Min

func Min() BlockSize

func NewBlockSize

func NewBlockSize(bs uint16) (BlockSize, error)

func (BlockSize) AsU16

func (bs BlockSize) AsU16() uint16

func (BlockSize) AsU32

func (bs BlockSize) AsU32() uint32

func (BlockSize) CeilAlign

func (bs BlockSize) CeilAlign(position uint64) uint64

func (BlockSize) Contains

func (bs BlockSize) Contains(other BlockSize) bool

func (BlockSize) FloorAlign

func (bs BlockSize) FloorAlign(position uint64) uint64

func (BlockSize) IsAligned

func (bs BlockSize) IsAligned(position uint64) bool

Jump to

Keyboard shortcuts

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