Skip to content

LDeakin/zfp-rs

Repository files navigation

zfp-rs: A pure-Rust implementation of the ZFP compression algorithm

Pure-Rust implementation of ZFP — a compression algorithm for compressed floating-point and integer arrays. Produces bit-for-bit identical compressed output to the original C implementation.

Compression comparison

Decompression comparison

Differences from the C implementation

zfp-rs is a ground-up Rust rewrite, not a binding or wrapper. Where it differs:

  • Idiomatic and Safe API: Safe public API with lifetime-checked borrows.
  • Performance: 2–4x faster than the serial C reference across all modes and types.
  • Parallel compression and fixed-rate decompression: With the rayon feature, compression can be parallelized across all modes. Fixed-rate decompression is parallelized via per-thread bitstream seeking. The C library does not parallelize decompression.
  • Zero-C dependency chain: No C compiler and no pkg-config.

zfp-rs-ffi: drop-in replacement for zfp-sys and the zfp C library

The zfp-rs-ffi crate provides a C-compatible ABI mirroring zfp-sys. zfp-rs-ffi can be used as a drop-in replacement for the zfp-sys in Rust projects:

zfp-sys = { package = "zfp-rs-ffi", version = "0.1" }

Acknowledgement

This implementation is based on zfp. The algorithm is described in the zfp documentation and in the following paper:

About

A pure-Rust implementation of the ZFP compression algorithm

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Contributors

Languages