# roaring.bitmap64

> A module of roaring's API.

`Bitmap64` — a Roaring bitmap over `UInt64` values, per the "extension for 64-bit implementations": a sorted map from a 32-bit high key to a full `Bitmap32` over the low 32 bits. This is the shape Apache Iceberg uses for deletion vectors (row positions are `UInt64`).

## Structs

### `Bitmap64`

```mojo
struct Bitmap64
```

Implements: `Copyable`, `Movable`

Fields:

- `maps: Dict[UInt32, Bitmap32]`

#### `__init__`

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

#### `add`

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

#### `add_range`

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

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

#### `remove`

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

#### `run_optimize`

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

#### `contains`

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

#### `cardinality`

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

#### `is_empty`

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

#### `min`

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

#### `max`

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

#### `to_list`

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

#### `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
```
