[−][src]Trait varint_simd::num::VarIntTarget
Represents an unsigned scalar value that can be encoded to and decoded from a varint.
Associated Types
type Signed: SignedVarIntTarget
[src]
The signed version of this type
Associated Constants
pub const MAX_VARINT_BYTES: u8
[src]
The maximum length of varint that is necessary to represent this number
pub const MAX_LAST_VARINT_BYTE: u8
[src]
The maximum value of the last byte if the varint is MAX_VARINT_BYTES long such that the varint would not overflow the target
Required methods
pub fn vector_to_num(res: [u8; 16]) -> Self
[src]
Converts a 128-bit vector to this number
Note: Despite operating on 128-bit SIMD vectors, these functions accept and return static arrays due to a lack of optimization capability by the compiler when passing or returning intrinsic vectors.
pub fn num_to_vector_stage1(self) -> [u8; 16]
[src]
Splits this number into 7-bit segments for encoding
pub fn zigzag(from: Self::Signed) -> Self
[src]
ZigZag encodes this value
pub fn unzigzag(self) -> Self::Signed
[src]
ZigZag decodes this value