Skip to content

Repository files navigation

VC-Delta3D

VC-Delta3D compresses three-dimensional uint8 and uint16 scalar fields. It combines optional bounded scalar quantization, an axis-adaptive Lorenzo delta transform, and order-0 rANS entropy coding.

Encoded chunks use the self-describing D3D1 wire format and the Zarr compressor identifier vc-delta3d.

C++

#include <vc_delta3d/codec.hpp>

auto encoded = vc_delta3d::compress(bytes, {z, y, x}, element_size);
auto decoded = vc_delta3d::decompress(encoded, bytes.size());

CMake consumers can link vc_delta3d::vc_delta3d.

Python

from vc_delta3d import Delta3D

codec = Delta3D(quant=1)
encoded = codec.encode(array)
decoded = codec.decode(encoded)

Importing vc_delta3d registers vc-delta3d with numcodecs.

Build

cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release
ninja -C build
ctest --test-dir build --output-on-failure

Performance

Measured on s3://vesuvius-challenge-open-data/PHercParis4/volumes/20260411134726-2.400um-0.2m-78keV-masked.zarr/5 :

start size:       2.30 GiB (2,474,382,596 bytes)
end size:         471.70 MiB (494,617,928 bytes)
compression ratio: 5.00x (19.99% of raw)
encode speed:     316.5 MiB/s
decode speed:     449.8 MiB/s
copy throughput:  85.5 MiB/s

Size is for the full array , enc/dec speed are calculated from 128 randomly selected nonzero chunks

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages