block

package
v0.0.0-...-3976360 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MaxHandleEncodedLength = 2 * binary.MaxVarintLen64

Variables

View Source
var ErrCorruptBlock = errors.New("leveldb: corrupt block")

Functions

func EncodeHandle

func EncodeHandle(dst []byte, h Handle) int

Types

type Block

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

func NewBlock

func NewBlock(contents []byte) *Block

func (*Block) Len

func (b *Block) Len() int

func (*Block) NewIterator

func (b *Block) NewIterator(cmp keys.Comparator) iterator.Iterator

type Handle

type Handle struct {
	Offset uint64
	Length uint64
}

func DecodeHandle

func DecodeHandle(buf []byte) (Handle, int)

type Writer

type Writer struct {
	RestartInterval int
	// contains filtered or unexported fields
}

func (*Writer) Add

func (w *Writer) Add(key, value []byte)

func (*Writer) ApproximateSize

func (w *Writer) ApproximateSize() int

func (*Writer) Empty

func (w *Writer) Empty() bool

func (*Writer) Finish

func (w *Writer) Finish() *bytes.Buffer

func (*Writer) Reset

func (w *Writer) Reset()

Jump to

Keyboard shortcuts

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