base94-simd 0.1.0

SIMD-accelerated base94 codec
Documentation
  • Coverage
  • 100%
    9 out of 9 items documented0 out of 6 items with examples
  • Size
  • Source code size: 62.17 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 389.58 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • lxl66566/nextppp
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • lxl66566

base94-simd

SIMD-accelerated base94 codec: encodes arbitrary binary data into the printable ASCII range 0x20..=0x7E (94 symbols), with an optional key-mixing step (kf) and a base94 digit encoding for integers.

Bytes are key-mixed ((b - kf) mod 256); mixed values >= 93 escape into two chars (0x7D/0x7E leader + follower), so output is at most twice the input size. With kf = 0 the mixing is the identity.

Backends

  • x86_64: SSSE3 kernels over 16-byte blocks (runtime-detected; SSE2 helpers for the validity scan and length computation).
  • aarch64: baseline NEON kernels over 16-byte blocks (vqtbl1 shares the compaction LUT with the pshufb backend; no runtime detection needed).
  • other targets: portable scalar path (the reference definition).

All backends are bit-exact, pinned by fuzzing against the scalar reference.

let mut encoded = Vec::new();
base94_simd::encode_into(&mut encoded, b"hello", 0);
assert!(encoded.iter().all(|&c| (0x20..=0x7e).contains(&c)));
let mut decoded = Vec::new();
base94_simd::decode_into(&mut decoded, &encoded, 0).unwrap();
assert_eq!(decoded, b"hello");