lump

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: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LUMP_MAX_SIZE     = 0xFFFF*(512) - 2
	MAX_EMBEDDED_SIZE = 0xFFFF
)

lump data

View Source
const (
	JournalRegion = iota
	DataRegion
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LumpData

type LumpData struct {
	Inner *block.AlignedBytes
}

func NewLumpDataAligned

func NewLumpDataAligned(size int, blockSize block.BlockSize) LumpData

TODO, to be aligned at upper

func NewLumpDataWithAb

func NewLumpDataWithAb(ab *block.AlignedBytes) LumpData

func (LumpData) AsBytes

func (l LumpData) AsBytes() []byte

type LumpDataInner

type LumpDataInner int

type LumpEmbededData

type LumpEmbededData struct {
	Inner []byte
}

type LumpId

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

func EmptyLump

func EmptyLump() LumpId

func FromBytes

func FromBytes(vec []byte) (LumpId, error)

func FromString

func FromString(s string) (LumpId, error)

func FromU64

func FromU64(hi uint64, lo uint64) LumpId

func (LumpId) Compare

func (left LumpId) Compare(right LumpId) int

func (LumpId) GetBytes

func (id LumpId) GetBytes() []byte

func (LumpId) Inc

func (id LumpId) Inc() LumpId

func (LumpId) IsMax

func (id LumpId) IsMax() bool

func (LumpId) String

func (id LumpId) String() string

func (LumpId) U64

func (id LumpId) U64() uint64

func (LumpId) Write

func (id LumpId) Write(w io.Writer) (int, error)

Jump to

Keyboard shortcuts

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