boolslice

package
v5.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorOutOfBounds error = errors.New("out of bounds")

ErrorOutOfBounds err

Functions

This section is empty.

Types

type BoolSlice

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

BoolSlice struct

func NewBoolSlice

func NewBoolSlice(size int) (*BoolSlice, error)

NewBoolSlice builds new empty BoolSlice

func Rebuild

func Rebuild(size int, data []byte) (*BoolSlice, error)

Rebuild generates new BoolSlice from data

func (*BoolSlice) Bytes

func (b *BoolSlice) Bytes() []byte

Bytes gets bitmap

func (*BoolSlice) Clear

func (b *BoolSlice) Clear(index int) error

Clear clears a bit from index passed

func (*BoolSlice) Get

func (b *BoolSlice) Get(index int) (bool, error)

Get gets value from index passed

func (*BoolSlice) Set

func (b *BoolSlice) Set(index int) error

Set sets a bit from index passed

Jump to

Keyboard shortcuts

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