Documentation ¶
Overview ¶
Package bitset provides an interface for bit-string data-structures and also provides a memory-efficient bit-string implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitSet ¶
type BitSet interface { // Has tests whether the bit at pos has been set. Has(pos int) bool // Set sets the bit at pos to one. Set(pos int) // Clear sets the bit at pos to zero. Clear(pos int) // CopyBit copies the bit at index from the source into the bit-string. CopyBit(src BitSet, index int) // CopyBits copies the bits at indices from the source into the bit-string. CopyBits(src BitSet, indices []int) // Len returns the length of the bit-string. Len() int }
BitSet provides an interface for manipulating bit-strings by accessing individual bits and recombining partial bit-sets.
func FromString ¶
FromString converts a string in big-endian notation to a new bit-set.
Click to show internal directories.
Click to hide internal directories.