Expand description
A fast, efficient, sparse, & ordered unsigned integer (u32) bit set which is invertible.
The bitset is implemented using fixed size pages which allows it to compactly represent sparse membership. However, the set excels when set members are typically clustered together. For example when representing glyph id or unicode codepoint values in a font.
The set can have inclusive (the set of integers which are members) or exclusive (the set of integers which are not members) membership. The exclusive/inverted version of the set is useful for patterns such as βkeep all codepoints except for {x, y, z, β¦}β.
When constructing a new IntSet
from an existing lists of integer values the most efficient
way to create the set is to initialize it from a sorted (ascending) iterator of the values.
For a type to be stored in the IntSet
it must implement the Domain
trait, and all
unique values of that type must be able to be mapped to and from a unique u32
value.
See the Domain
trait for more information.
ModulesΒ§
- bitpage π
- Stores a page of bits, used inside of bitsetβs.
- bitset π
- A fast, efficient, sparse, & ordered unsigned integer (
u32
) bit set. - input_
bit_ πstream - Reads individual bits from a array of bytes.
- output_
bit_ πstream - Writes individual bits to a vector of bytes.
- sparse_
bit_ set - Provides serialization of
IntSet
βs to a highly compact bitset format as defined in the IFT specification:
StructsΒ§
- InDomain
- Marks a mapped value as being in the domain of
T
forDomain
. - IntSet
- A fast & efficient invertible ordered set for small (up to 32-bit) unsigned integer types.
- Iter π
- U32Set
- A fast, efficient, sparse, & ordered
u32
set.
EnumsΒ§
- Membership π
- Range
Iter π
TraitsΒ§
- Domain
- Defines the domain of
IntSet
member types.