Crate crc64fast_nvme

Source
Expand description

§crc64fast-nvme

SIMD-accelerated CRC-64/NVME computation (similar to crc32fast).

§Usage

§Rust

use crc64fast_nvme::Digest;

let mut c = Digest::new();
c.write(b"hello ");
c.write(b"world!");
let checksum = c.sum64();
assert_eq!(checksum, 0xd9160d1fa8e418e3);

§C-compatible shared library example (PHP)

$digest = $ffi->digest_new();
$ffi->digest_write($digest, 'hello world!', 12);
$checksum = $ffi->digest_sum64($digest); // 0xd9160d1fa8e418e3

Tracking links for unstable features used here with the experimental VPCLMULQDQ features (which require nightly builds):

Structs§

  • Represents an in-progress CRC-64 computation.
  • Opaque type for C for use in FFI (C-compatible shared library)

Functions§

  • Frees the Digest (C-compatible shared library)
  • Creates a new Digest (C-compatible shared library)
  • Calculates the CRC-64 checksum from the Digest (C-compatible shared library)
  • Writes data to the Digest (C-compatible shared library)