archive

package
v0.0.0-...-c864ae1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: BSD-2-Clause, BSD-3-Clause, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package archive offers support for the compact storage and retrieval of state in memory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BooleanArchive

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

BooleanArchive offers a compact storage and retrieval mechanism for a fixed size set of boolean data.

func New

func New(size int) *BooleanArchive

BooleanArchive offers a compact storage and retrieval mechanism for a fixed size set of boolean data.

func (*BooleanArchive) ArchiveLen

func (a *BooleanArchive) ArchiveLen() int

ArchiveLen returns the number of uint64 integers used to store archived boolean data.

func (*BooleanArchive) Decode

func (a *BooleanArchive) Decode(encoding string) error

func (*BooleanArchive) Encoding

func (a *BooleanArchive) Encoding() string

func (*BooleanArchive) IsEquivalentTo

func (a *BooleanArchive) IsEquivalentTo(b *BooleanArchive) bool

func (*BooleanArchive) Len

func (a *BooleanArchive) Len() int

Len returns the length of entries stored in the archive.

func (*BooleanArchive) SetValue

func (a *BooleanArchive) SetValue(entryIndex int, value bool)

SetValue stores the supplied boolean value in the archive at entryIndex.

func (*BooleanArchive) Value

func (a *BooleanArchive) Value(entryIndex int) bool

Value retrieves the boolean value stored at the requested entryIndex of the archive.

Jump to

Keyboard shortcuts

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