pub unsafe fn decode_eight_u8_unsafe(bytes: *const u8) -> ([u8; 8], u8)
Available with target feature ssse3 only.
Expand description

Decodes four adjacent varints into u8’s simultaneously. Requires SSSE3 support. Does not perform overflow checking and may produce incorrect output.

Returns a tuple containing an array of decoded values, and the total number of bytes read.

Safety

There must be at least 16 bytes of allocated memory after the start of the pointer. Otherwise, there may be undefined behavior. Truncated values will be returned if the varint represents a number larger than what a u8 can handle.

This function does not perform overflow checking. If a varint exceeds two bytes in encoded length, it may be interpreted as multiple varints, and the reported length of data read will be shorter than expected. Caution is encouraged when using this function.