semvec/pypi-packages huggingface dataset:
pybitset 0.0.2
python binding for cbitset
License: BSD
Requires Python: >=3.7
Keywords: bitset

<h1 align="center"><i>✨ pybitset ✨ </i></h1>

<h3 align="center">The python binding for <a href="https://github.com/lemire/cbitset">cbitset</a></h3>

[![pypi](https://img.shields.io/pypi/v/pybitset.svg)](https://pypi.org/project/pybitset/)
![python](https://img.shields.io/pypi/pyversions/pybitset)
![implementation](https://img.shields.io/pypi/implementation/pybitset)
![wheel](https://img.shields.io/pypi/wheel/pybitset)
![license](https://img.shields.io/github/license/synodriver/pybitset.svg)
![action](https://img.shields.io/github/workflow/status/synodriver/pybitset/build%20wheel)

### install
```bash
pip install pybitset
```


### Usage
```python
from pybitset import BitSet

b= BitSet()
for i in range(1000):
    b.set(3*i)

for v in b:
    print(v)
```
- use ```BITSET_USE_CFFI``` env var to specify a backend

### Public functions
```python
class BitSet:
    def __init__(self) -> None: ...
    def __del__(self) -> None: ...
    @staticmethod
    def from_ptr(ptr) -> BitSet: ...
    def clear(self) -> None: ...
    def fill(self) -> None: ...
    def copy(self) -> BitSet: ...
    def resize(self, newarraysize: int, padwithzeroes: bool) -> bool: ...
    def size_in_bytes(self) -> int: ...
    def size_in_bits(self) -> int: ...
    def size_in_words(self) -> int: ...
    def grow(self, newarraysize: int) -> bool: ...
    def trim(self) -> bool: ...
    def shift_left(self, s: int) -> None: ...
    def shift_right(self, s: int) -> None: ...
    def set(self, i: int) -> None: ...
    def set_to_value(self, i: int, flag: bool) -> None: ...
    def get(self, i: int) -> bool: ...
    def count(self) -> int: ...
    def minimum(self) -> int: ...
    def maximum(self) -> int: ...
    def inplace_union(self, b2: BitSet) -> bool: ...
    def union_count(self, b2: BitSet) -> int: ...
    def inplace_intersection(self, b2: BitSet): ...
    def intersection_count(self, b2: BitSet) -> int: ...
    def disjoint(self, b2: BitSet) -> bool: ...
    def intersect(self, b2: BitSet) -> bool: ...
    def contains_all(self, b2: BitSet) -> bool: ...
    def inplace_difference(self, b2: BitSet) -> None: ...
    def difference_count(self, b2: BitSet) -> int: ...
    def inplace_symmetric_difference(self, b2: BitSet) -> bool: ...
    def symmetric_difference_count(self, b2: BitSet) -> int: ...
    def __iter__(self): ...
    def for_each(self, func) -> bool: ...
    def print(self) -> None: ...

```