pub fn trim_i8_encode(f: &[i8], nbits: u32, d: &mut [u8]) -> usizeExpand description
Encode small integers into bytes, with a fixed size per value.
Encode the provided sequence of signed integers f, with nbits bits per
value, into the destination buffer d. The actual number of written bytes
is returned. If the total encoded size is not an integral number of bytes,
then extra padding bits of value 0 are used.