# _Bits
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L1)</span>
```pony
primitive val _Bits
```

## Constructors

### create
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L1)</span>


```pony
new val create()
: _Bits val^
```

#### Returns

* [_Bits](collections-persistent-_Bits.md) val^

---

## Public Functions

### collision_depth
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L2)</span>


```pony
fun box collision_depth()
: U32 val
```

#### Returns

* [U32](builtin-U32.md) val

---

### set_bit
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L4)</span>


```pony
fun box set_bit(
  bm: U32 val,
  i: U32 val)
: U32 val
```
#### Parameters

*   bm: [U32](builtin-U32.md) val
*   i: [U32](builtin-U32.md) val

#### Returns

* [U32](builtin-U32.md) val

---

### clear_bit
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L7)</span>


```pony
fun box clear_bit(
  bm: U32 val,
  i: U32 val)
: U32 val
```
#### Parameters

*   bm: [U32](builtin-U32.md) val
*   i: [U32](builtin-U32.md) val

#### Returns

* [U32](builtin-U32.md) val

---

### check_bit
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L10)</span>


```pony
fun box check_bit(
  bm: U32 val,
  i: U32 val)
: Bool val
```
#### Parameters

*   bm: [U32](builtin-U32.md) val
*   i: [U32](builtin-U32.md) val

#### Returns

* [Bool](builtin-Bool.md) val

---

### mask32
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L13)</span>


```pony
fun box mask32(
  n: U32 val,
  d: U32 val)
: U32 val
```
#### Parameters

*   n: [U32](builtin-U32.md) val
*   d: [U32](builtin-U32.md) val

#### Returns

* [U32](builtin-U32.md) val

---

### mask
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L16)</span>


```pony
fun box mask(
  n: USize val,
  d: USize val)
: USize val
```
#### Parameters

*   n: [USize](builtin-USize.md) val
*   d: [USize](builtin-USize.md) val

#### Returns

* [USize](builtin-USize.md) val

---

### next_pow32
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L19)</span>


```pony
fun box next_pow32(
  n: USize val)
: USize val
```
#### Parameters

*   n: [USize](builtin-USize.md) val

#### Returns

* [USize](builtin-USize.md) val

---

### eq
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L2)</span>


```pony
fun box eq(
  that: _Bits val)
: Bool val
```
#### Parameters

*   that: [_Bits](collections-persistent-_Bits.md) val

#### Returns

* [Bool](builtin-Bool.md) val

---

### ne
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L2)</span>


```pony
fun box ne(
  that: _Bits val)
: Bool val
```
#### Parameters

*   that: [_Bits](collections-persistent-_Bits.md) val

#### Returns

* [Bool](builtin-Bool.md) val

---

