# hashes.murmur3

> A module of hashes's API.

MurmurHash3_x86_32, plus the Iceberg Appendix-B pre-hash wrappers.

Iceberg's `bucket[N]` partition transform is `(hash(v) & Int32.MAX) % N`
where `hash` is MurmurHash3 x86-32 with seed 0 over a type-specific byte
serialization (spec: https://iceberg.apache.org/spec/#appendix-b-32-bit-hash-requirements).

## Functions

### `murmur3_x86_32`

```mojo
def murmur3_x86_32(data: Span[UInt8], seed: UInt32 = UInt32(0)) -> UInt32
```

### `iceberg_hash_long`

```mojo
def iceberg_hash_long(v: Int64) -> Int32
```

### `iceberg_hash_int`

```mojo
def iceberg_hash_int(v: Int32) -> Int32
```

### `iceberg_hash_string`

```mojo
def iceberg_hash_string(s: StringSpan) -> Int32
```

### `iceberg_hash_bytes`

```mojo
def iceberg_hash_bytes(data: Span[UInt8]) -> Int32
```

### `iceberg_hash_uuid`

```mojo
def iceberg_hash_uuid(hi: UInt64, lo: UInt64) -> Int32
```

### `iceberg_hash_decimal`

```mojo
def iceberg_hash_decimal(unscaled: Int64) -> Int32
```

### `iceberg_bucket`

```mojo
def iceberg_bucket(hash: UInt32, n: Int) -> Int
```
