pub struct ForEncoder;Expand description
Frame-of-Reference encoder for integer columns.
Stores each value as value - reference using the minimum number of
bits. Values must fit in i64.
Implementations§
Source§impl ForEncoder
impl ForEncoder
Sourcepub fn encode_i64(values: &[i64]) -> Result<Vec<u8>>
pub fn encode_i64(values: &[i64]) -> Result<Vec<u8>>
Encode a sequence of i64 values using FOR.
§Errors
Returns EncodingError::EmptyInput if values is empty.
Sourcepub fn encode_u64(values: &[u64]) -> Result<Vec<u8>>
pub fn encode_u64(values: &[u64]) -> Result<Vec<u8>>
Encode a sequence of u64 values using FOR.
Uses native u64 arithmetic to avoid bit-width inflation at the
i64 sign boundary (values near i64::MAX / i64::MIN).
§Errors
Returns EncodingError::EmptyInput if values is empty.
Trait Implementations§
Source§impl Clone for ForEncoder
impl Clone for ForEncoder
Source§fn clone(&self) -> ForEncoder
fn clone(&self) -> ForEncoder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ForEncoder
Auto Trait Implementations§
impl Freeze for ForEncoder
impl RefUnwindSafe for ForEncoder
impl Send for ForEncoder
impl Sync for ForEncoder
impl Unpin for ForEncoder
impl UnsafeUnpin for ForEncoder
impl UnwindSafe for ForEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more