Skip to main content

SimdAlphabet

Trait SimdAlphabet 

Source
trait SimdAlphabet {
    const ENCODE_LUT: [i8; 16];
    const DECODE_SHIFT_LUT: [i8; 16];
    const DECODE_MASK_LUT: [u8; 16];
    const DECODE_FIXUP_CHAR: i8;
    const DECODE_FIXUP_SHIFT: i8;
}
Expand description

A base64 alphabet family the SIMD kernels can accelerate.

Carries the per-alphabet lookup tables as associated constants. Private (hence sealed); implemented only by Standard and UrlSafe, selected at runtime by SimdKind.

Required Associated Constants§

Source

const ENCODE_LUT: [i8; 16]

pshufb encode table: maps a reduced 6-bit index to ascii - index.

Source

const DECODE_SHIFT_LUT: [i8; 16]

pshufb decode table indexed by the high nibble; added to the byte to produce its 6-bit value.

Source

const DECODE_MASK_LUT: [u8; 16]

pshufb decode table indexed by the low nibble; bit hi marks (hi, lo) as a valid symbol.

Source

const DECODE_FIXUP_CHAR: i8

The high-62/63 symbol whose shift needs the fixup below (+/-).

Source

const DECODE_FIXUP_SHIFT: i8

The shift applied to DECODE_FIXUP_CHAR.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl SimdAlphabet for Standard

Available on x86-64 or AArch64 only.
Source§

impl SimdAlphabet for UrlSafe

Available on x86-64 or AArch64 only.