Function varint_simd::encode_unsafe

source ·
pub unsafe fn encode_unsafe<T: VarIntTarget>(num: T) -> ([u8; 16], u8)
Available with target feature sse2 only.
Expand description

Encodes a single number to a varint. Requires SSE2 support.

Produces a tuple, with the encoded data followed by the number of bytes used to encode the varint.

Safety

This should not have any unsafe behavior with any input. However, it still calls a large number of unsafe functions.