Metadata-Version: 2.4
Name: zarrzipan
Version: 0.0.2
Summary: A zarr-based compression benchmarking tool
Project-URL: Repository, https://github.com/jkeifer/zarrzipan
Author-email: Jarrett Keifer <jkeifer0@gmail.com>
License: Apache License 2.0
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: numcodecs>=0.16.0
Requires-Dist: numpy>=2.2.5
Requires-Dist: zarr>=3.0.7
Description-Content-Type: text/markdown

# Zarrzipan: A raster compression benchmarking tool

Zarrzipan is a compression benchmarking tool based on Zarr.

## Usage

An example of how to use Zarrzipan is included in the
[`example.py`](./example.py) script.

To run this example and generate the benchmark results, execute:

```bash
uv run python example.py
```

### Benchmark Results

The following table summarizes the benchmark results generated by `example.py`:

<!--  [[[cog
import json
import subprocess
from cog import out

# Run the example.py script and capture its JSON output
result = subprocess.run(
    ["uv", "run", "python", "example.py"],
    capture_output=True,
    text=True,
    check=True
)

# Parse the JSON output
data = json.loads(result.stdout)

# Generate the Markdown table
out('| Dataset Name | Pipeline Name | Chunk Shape | Iterations | Compression Ratio | Space Saving | Avg Compress Time (ms) | Avg Decompress Time (ms) | Lossiness (MAE) |\n')
out('|---|---|---|---|---|---|---|---|---|\n')
for row in data:
    out(f"| {row['dataset_name']} | {row['pipeline_name']} | {row['chunk_shape']} | {row['iterations']} | {row['size_ratio']:.2f}x | {row['size_space_saving']:.2f} | {row['time_compress_avg_ms']:.2f} | {row['time_decompress_avg_ms']:.2f} | {row['lossiness_mae']:.4f} |\n")
 ]]]  -->
| Dataset Name | Pipeline Name | Chunk Shape | Iterations | Compression Ratio | Space Saving | Avg Compress Time (ms) | Avg Decompress Time (ms) | Lossiness (MAE) |
|---|---|---|---|---|---|---|---|---|
| SampleFloat32Array | ZlibCompression | (50, 50) | 3 | 3.34x | 0.30 | 2.90 | 1.59 | 0.0000 |
| SampleFloat32Array | BloscCompression | (50, 50) | 3 | 6.37x | 0.16 | 9.75 | 1.50 | 0.0000 |
<!-- [[[end]]] (sum: zGaWTm9szN) -->

## What does "zarrzipan" mean?

Zarrzipan, pronounced like marzipan, is like "Zarr zip analysis", where zip is
a general allusion to compression and not a reference to the specific zip
archive format.
