High-performance snapshot storage library with compression and encryption
Project description
hexz
Python library for reading, writing, and streaming Hexz snapshots — a seekable, deduplicated compression format built in Rust.
pip install hexz
Quick Start
Reading snapshots
import hexz
with hexz.open("data.hxz") as reader:
data = reader.read() # read entire snapshot
chunk = reader.read(4096) # read 4KB from current position
reader.seek(1024) # seek to offset
block = reader[100:200] # slice notation
Writing snapshots
import hexz
with hexz.open("output.hxz", mode="w", compression="lz4") as writer:
writer.add_file("disk.img")
writer.add_bytes(b"extra data")
Building from files
import hexz
# Build with a profile preset (ml, eda, embedded, generic, archival)
metadata = hexz.build("source.img", "output.hxz", profile="ml")
Converting from other formats
import hexz
# Convert tar, HDF5, or WebDataset archives
hexz.convert("dataset.tar", "dataset.hxz")
hexz.convert("data.h5", "data.hxz") # requires pip install hexz[hdf5]
Remote storage
import hexz
# Stream from S3 (only fetches needed blocks)
reader = hexz.open("s3://bucket/data.hxz", s3_region="us-east-1")
chunk = reader.read(4096)
# HTTP streaming
reader = hexz.open("https://example.com/data.hxz")
API
Core I/O
| Function / Class | Description |
|---|---|
hexz.open(path, mode="r", **opts) |
Open a snapshot for reading or writing |
Reader(path, ...) |
Read snapshots with file-like interface (seek, read, tell, slice) |
AsyncReader.create(path, ...) |
Async reader for asyncio workflows |
Writer(path, ...) |
Create new snapshots with compression and deduplication |
Data operations
| Function | Description |
|---|---|
build(source, output, profile, ...) |
Build snapshot from files with preset profiles |
convert(input, output, format, ...) |
Convert tar/HDF5/WebDataset to Hexz |
inspect(path) |
Get snapshot metadata (compression, size, block count) |
verify(path, ...) |
Verify integrity and optional cryptographic signature |
Array support
| Function / Class | Description |
|---|---|
read_array(source, offset, shape, dtype) |
Read NumPy array from snapshot |
write_array(dest, array, ...) |
Write NumPy array to snapshot |
ArrayView(path, shape, dtype) |
Memory-mapped array access with slicing |
ML integration
| Class | Description |
|---|---|
Dataset(path, ...) |
PyTorch Dataset with caching and prefetching |
from hexz import Dataset
from torch.utils.data import DataLoader
dataset = Dataset("s3://bucket/train.hxz", cache_size_mb=512)
loader = DataLoader(dataset, batch_size=32, num_workers=4, shuffle=True)
for batch in loader:
train_step(batch)
Cryptographic operations
import hexz
hexz.keygen("private.key", "public.key") # generate Ed25519 keypair
hexz.sign("snapshot.hxz", "private.key") # sign a snapshot
hexz.verify("snapshot.hxz", "public.key") # verify signature
Optional dependencies
pip install hexz[numpy] # NumPy array support
pip install hexz[torch] # PyTorch Dataset integration
pip install hexz[hdf5] # HDF5 conversion (h5py)
pip install hexz[ml] # NumPy + PyTorch
pip install hexz[full] # All optional dependencies
Compression
LZ4 is always available. Zstd and S3 streaming are included by default in PyPI wheels.
| Algorithm | Speed | Ratio | Default |
|---|---|---|---|
| LZ4 | Fast (~2-3 GB/s) | Moderate | Always included |
| Zstd | Moderate | High | Yes |
Requirements
- Python 3.8+
- Linux (x86_64, aarch64), macOS (x86_64, Apple Silicon), or Windows (x86_64)
Links
- GitHub
- Documentation
- CLI Tool —
hexzcommand-line binary
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hexz-0.5.2.tar.gz.
File metadata
- Download URL: hexz-0.5.2.tar.gz
- Upload date:
- Size: 404.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8dc5c9f24742e8facfbf84108008adbde193066de317f5a7068e3209fb4175b
|
|
| MD5 |
a3caaf10308879caea23f684f60a1dcb
|
|
| BLAKE2b-256 |
6f0a6b31ca183baf01d6c0032af8dd59cd64983858997f3e69f028e709912318
|
Provenance
The following attestation bundles were made for hexz-0.5.2.tar.gz:
Publisher:
release.yml on hexz-org/hexz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hexz-0.5.2.tar.gz -
Subject digest:
a8dc5c9f24742e8facfbf84108008adbde193066de317f5a7068e3209fb4175b - Sigstore transparency entry: 992067418
- Sigstore integration time:
-
Permalink:
hexz-org/hexz@438be7073d24191a84cf0220a36c1679a9263c1a -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/hexz-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@438be7073d24191a84cf0220a36c1679a9263c1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file hexz-0.5.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: hexz-0.5.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 4.4 MB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15ef791fa2a2606735a26c7c346527eca619f84daab3d2b9b77d2d0eae421860
|
|
| MD5 |
e4b9d23148d68a7b04e66cfa43562732
|
|
| BLAKE2b-256 |
f22761c87874a5d6666b18b53cf9ca7fb7e155e971e97433bd757c481127a5d0
|
Provenance
The following attestation bundles were made for hexz-0.5.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on hexz-org/hexz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hexz-0.5.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
15ef791fa2a2606735a26c7c346527eca619f84daab3d2b9b77d2d0eae421860 - Sigstore transparency entry: 992067442
- Sigstore integration time:
-
Permalink:
hexz-org/hexz@438be7073d24191a84cf0220a36c1679a9263c1a -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/hexz-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@438be7073d24191a84cf0220a36c1679a9263c1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file hexz-0.5.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: hexz-0.5.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 4.4 MB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b89cb8c2c7ae9870f436932bbff6706e9fa647627f28ca092f1f0687be55797a
|
|
| MD5 |
6674ece9c856cae07c08f2c2fbe8634a
|
|
| BLAKE2b-256 |
9b912b2bbdf56f8abc0a4887e5016e28511887f6358e9ec9aa83dfd4b8547df7
|
Provenance
The following attestation bundles were made for hexz-0.5.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on hexz-org/hexz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hexz-0.5.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
b89cb8c2c7ae9870f436932bbff6706e9fa647627f28ca092f1f0687be55797a - Sigstore transparency entry: 992067438
- Sigstore integration time:
-
Permalink:
hexz-org/hexz@438be7073d24191a84cf0220a36c1679a9263c1a -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/hexz-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@438be7073d24191a84cf0220a36c1679a9263c1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file hexz-0.5.2-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: hexz-0.5.2-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2516280244d4270842bac33ebc6490d8679cafaace58e3982cf5fb9d9fbabdbb
|
|
| MD5 |
9466ee5d7bf7e600e10081adb0f3fffe
|
|
| BLAKE2b-256 |
2480e47071295dbcd56b4278c7c82d68b27d8f339efebf4c1cf373299473072a
|
Provenance
The following attestation bundles were made for hexz-0.5.2-cp38-abi3-win_amd64.whl:
Publisher:
release.yml on hexz-org/hexz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hexz-0.5.2-cp38-abi3-win_amd64.whl -
Subject digest:
2516280244d4270842bac33ebc6490d8679cafaace58e3982cf5fb9d9fbabdbb - Sigstore transparency entry: 992067421
- Sigstore integration time:
-
Permalink:
hexz-org/hexz@438be7073d24191a84cf0220a36c1679a9263c1a -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/hexz-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@438be7073d24191a84cf0220a36c1679a9263c1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file hexz-0.5.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: hexz-0.5.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01898fda48d668ed15ae193f07d606694c845772711ef68cd777ecbe63ef7b1e
|
|
| MD5 |
a84b83f1c08e0449701b3264e642b55d
|
|
| BLAKE2b-256 |
5dc045f09563f28626487d428caab8b6a9bc4deb60f3f68f9ddef847e8fe550d
|
Provenance
The following attestation bundles were made for hexz-0.5.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on hexz-org/hexz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hexz-0.5.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
01898fda48d668ed15ae193f07d606694c845772711ef68cd777ecbe63ef7b1e - Sigstore transparency entry: 992067435
- Sigstore integration time:
-
Permalink:
hexz-org/hexz@438be7073d24191a84cf0220a36c1679a9263c1a -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/hexz-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@438be7073d24191a84cf0220a36c1679a9263c1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file hexz-0.5.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: hexz-0.5.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc227c1f4b03b02e44d5db716144ce10810d700eb76b193ed53d3e4568ebef70
|
|
| MD5 |
847200aa8634f0e3248d73c57d164ae7
|
|
| BLAKE2b-256 |
574a8b9ed2b5b1f3b81cf933ad68f6bf435974e5b98d9dcc27fb7c54a2e57388
|
Provenance
The following attestation bundles were made for hexz-0.5.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on hexz-org/hexz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hexz-0.5.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
dc227c1f4b03b02e44d5db716144ce10810d700eb76b193ed53d3e4568ebef70 - Sigstore transparency entry: 992067427
- Sigstore integration time:
-
Permalink:
hexz-org/hexz@438be7073d24191a84cf0220a36c1679a9263c1a -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/hexz-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@438be7073d24191a84cf0220a36c1679a9263c1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file hexz-0.5.2-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: hexz-0.5.2-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.9 MB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3065fb22a4e8b927cd9b4fa2d17681b65f0f51b4af6d5aa62d7f6a647e68ee27
|
|
| MD5 |
f9c05e4ed5644e6c014fe114598f2f0e
|
|
| BLAKE2b-256 |
a79ba5c0ead1c73296f22ef34935969bb2c1d46d91f1fef808cd37d80bb2d27f
|
Provenance
The following attestation bundles were made for hexz-0.5.2-cp38-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on hexz-org/hexz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hexz-0.5.2-cp38-abi3-macosx_11_0_arm64.whl -
Subject digest:
3065fb22a4e8b927cd9b4fa2d17681b65f0f51b4af6d5aa62d7f6a647e68ee27 - Sigstore transparency entry: 992067444
- Sigstore integration time:
-
Permalink:
hexz-org/hexz@438be7073d24191a84cf0220a36c1679a9263c1a -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/hexz-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@438be7073d24191a84cf0220a36c1679a9263c1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file hexz-0.5.2-cp38-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: hexz-0.5.2-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5205f3a0bbe15b8c865e1a56cfe8bb9a60cee264a3d2a634dc44c660b1806130
|
|
| MD5 |
6a7b999ca7d201839f7dc00f3f3a5e6f
|
|
| BLAKE2b-256 |
cabc33c6d3000e90895578eb83e21fb4ad4eeff99ad16f5a8588a6802976639c
|
Provenance
The following attestation bundles were made for hexz-0.5.2-cp38-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on hexz-org/hexz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hexz-0.5.2-cp38-abi3-macosx_10_12_x86_64.whl -
Subject digest:
5205f3a0bbe15b8c865e1a56cfe8bb9a60cee264a3d2a634dc44c660b1806130 - Sigstore transparency entry: 992067443
- Sigstore integration time:
-
Permalink:
hexz-org/hexz@438be7073d24191a84cf0220a36c1679a9263c1a -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/hexz-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@438be7073d24191a84cf0220a36c1679a9263c1a -
Trigger Event:
push
-
Statement type: