# roaring.bitmap32

> A module of roaring's API.

`Bitmap32` — a Roaring bitmap over `UInt32` values: a sorted set of 16-bit-keyed `Container`s, one per distinct high-16-bits key present.

## Structs

### `Bitmap32`

```mojo
struct Bitmap32
```

Implements: `Copyable`, `Movable`

Fields:

- `containers: Dict[UInt16, Container]`

#### `__init__`

```mojo
def __init__(out self)
```

#### `add`

```mojo
def add(mut self, v: UInt32)
```

#### `add_range`

```mojo
def add_range(mut self, start: UInt32, stop: UInt32)
```

Add every value in `[start, stop)`.

#### `remove`

```mojo
def remove(mut self, v: UInt32)
```

#### `run_optimize`

```mojo
def run_optimize(mut self)
```

#### `contains`

```mojo
def contains(self, v: UInt32) -> Bool
```

#### `cardinality`

```mojo
def cardinality(self) -> Int
```

#### `is_empty`

```mojo
def is_empty(self) -> Bool
```

#### `min`

```mojo
def min(self) -> UInt32
```

#### `max`

```mojo
def max(self) -> UInt32
```

#### `to_list`

```mojo
def to_list(self) -> List[UInt32]
```

#### `or_`

```mojo
def or_(a, b: Self) -> Self
```

#### `and_`

```mojo
def and_(a, b: Self) -> Self
```

#### `and_not`

```mojo
def and_not(a, b: Self) -> Self
```

#### `xor`

```mojo
def xor(a, b: Self) -> Self
```

#### `serialize_portable`

```mojo
def serialize_portable(self) -> List[UInt8]
```

#### `portable_size`

```mojo
def portable_size(self) -> Int
```

#### `deserialize_portable`

```mojo
def deserialize_portable[origin: Origin[mut=origin.mut], //](data: Span[UInt8, origin]) -> Self
```
