Struct bitpacking::BitPacker1x

source ·
pub struct BitPacker1x;
Expand description

BitPacker1x is standard bitpacking : the integer representation over b bits are simply concatenated one after the other.

One block must contain 32 integers.

Trait Implementations§

source§

impl BitPacker for BitPacker1x

source§

const BLOCK_LEN: usize = 32usize

Number of u32 per compressed block
source§

fn new() -> BitPacker1x

Checks the available instructions set on the current CPU and returns the best available implementation. Read more
source§

fn compress( &self, decompressed: &[u32], compressed: &mut [u8], num_bits: u8 ) -> usize

Compress a block of u32. Read more
source§

fn compress_sorted( &self, initial: u32, decompressed: &[u32], compressed: &mut [u8], num_bits: u8 ) -> usize

Delta encode and compressed the decompressed array. Read more
source§

fn compress_strictly_sorted( &self, initial: Option<u32>, decompressed: &[u32], compressed: &mut [u8], num_bits: u8 ) -> usize

Delta encode and compress the decompressed array. Read more
source§

fn decompress( &self, compressed: &[u8], decompressed: &mut [u32], num_bits: u8 ) -> usize

Decompress the compress array to the decompressed array. Read more
source§

fn decompress_sorted( &self, initial: u32, compressed: &[u8], decompressed: &mut [u32], num_bits: u8 ) -> usize

Decompress thecompressarray to the decompressed array. The compressed array is assumed to have been delta-encoded and compressed. Read more
source§

fn decompress_strictly_sorted( &self, initial: Option<u32>, compressed: &[u8], decompressed: &mut [u32], num_bits: u8 ) -> usize

Decompress thecompressarray to the decompressed array. The compressed array is assumed to have been strict-delta-encoded and compressed. Read more
source§

fn num_bits(&self, decompressed: &[u32]) -> u8

Returns the minimum number of bits used to represent the largest integer in the decompressed block. Read more
source§

fn num_bits_sorted(&self, initial: u32, decompressed: &[u32]) -> u8

Returns the minimum number of bits used to represent the largest delta in the deltas in the decompressed block. Read more
source§

fn num_bits_strictly_sorted( &self, initial: Option<u32>, decompressed: &[u32] ) -> u8

Returns the minimum number of bits used to represent the largest delta-1 in the deltas in the decompressed block. Read more
source§

fn compressed_block_size(num_bits: u8) -> usize

Returns the size of a compressed block.
source§

impl Clone for BitPacker1x

source§

fn clone(&self) -> BitPacker1x

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Copy for BitPacker1x

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.