Go package implementing bitsets
Bitset is a Go language library that implements bitsets, providing an efficient mapping between non-negative integers and boolean values as an alternative to map[uint] bool. The package offers methods for individual bit operations like setting, clearing, flipping, and testing, as well as set operations including intersection, union, difference, complement, and symmetric difference. It supports serialization to and from byte streams, method chaining, and iteration over set bits, with memory usage of approximately N/8 bytes for N bits. The library is part of the broader Go ecosystem and is used in production by numerous systems across databases, search engines, blockchain platforms, infrastructure tools, and machine learning applications.