Documentation ¶
Overview ¶
Package bitseq provides a structure and utilities for representing long bitmask as sequence of run-lenght encoded blocks. It operates direclty on the encoded representation, it does not decode/encode.
Index ¶
- type Handle
- func (h *Handle) Bits() uint32
- func (h *Handle) Destroy()
- func (h *Handle) Exists() bool
- func (h *Handle) FromByteArray(ba []byte) error
- func (h *Handle) Index() uint64
- func (h *Handle) IsSet(ordinal uint32) bool
- func (h *Handle) Key() []string
- func (h *Handle) KeyPrefix() []string
- func (h *Handle) Set(ordinal uint32) error
- func (h *Handle) SetAny() (uint32, error)
- func (h *Handle) SetIndex(index uint64)
- func (h *Handle) SetValue(value []byte) error
- func (h *Handle) String() string
- func (h *Handle) ToByteArray() ([]byte, error)
- func (h *Handle) Unselected() uint32
- func (h *Handle) Unset(ordinal uint32) error
- func (h *Handle) Value() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handle ¶
Handle contains the sequece representing the bitmask and its identifier
func (*Handle) Destroy ¶
func (h *Handle) Destroy()
Destroy removes from the datastore the data belonging to this handle
func (*Handle) FromByteArray ¶
FromByteArray reads his handle's data from a byte array
func (*Handle) IsSet ¶
IsSet atomically checks if the ordinal bit is set. In case ordinal is outside of the bit sequence limits, false is returned.
func (*Handle) KeyPrefix ¶
KeyPrefix returns the immediate parent key that can be used for tree walk
func (*Handle) SetAny ¶
SetAny atomically sets the first unset bit in the sequence and returns the corresponding ordinal
func (*Handle) SetIndex ¶
SetIndex method allows the datastore to store the latest DB Index into this object
func (*Handle) ToByteArray ¶
ToByteArray converts this handle's data into a byte array
func (*Handle) Unselected ¶
Unselected returns the number of bits which are not selected