Struct bitpacking::BitPacker8x
source · pub struct BitPacker8x(/* private fields */);
Expand description
BitPacker8x
packs integers in groups of 8. This gives an opportunity
to leverage AVX2
instructions to encode and decode the stream.
One block must contain 256 integers
.
Trait Implementations§
source§impl BitPacker for BitPacker8x
impl BitPacker for BitPacker8x
source§fn new() -> Self
fn new() -> Self
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
fn compress( &self, decompressed: &[u32], compressed: &mut [u8], num_bits: u8 ) -> usize
Compress a block of
u32
. Read moresource§fn compress_sorted(
&self,
initial: u32,
decompressed: &[u32],
compressed: &mut [u8],
num_bits: u8
) -> usize
fn compress_sorted( &self, initial: u32, decompressed: &[u32], compressed: &mut [u8], num_bits: u8 ) -> usize
Delta encode and compressed the
decompressed
array. Read moresource§fn compress_strictly_sorted(
&self,
initial: Option<u32>,
decompressed: &[u32],
compressed: &mut [u8],
num_bits: u8
) -> usize
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 moresource§fn decompress_sorted(
&self,
initial: u32,
compressed: &[u8],
decompressed: &mut [u32],
num_bits: u8
) -> usize
fn decompress_sorted( &self, initial: u32, compressed: &[u8], decompressed: &mut [u32], num_bits: u8 ) -> usize
Decompress the
compress
array to the decompressed
array.
The compressed
array is assumed to have been delta-encoded and compressed. Read moresource§fn decompress_strictly_sorted(
&self,
initial: Option<u32>,
compressed: &[u8],
decompressed: &mut [u32],
num_bits: u8
) -> usize
fn decompress_strictly_sorted( &self, initial: Option<u32>, compressed: &[u8], decompressed: &mut [u32], num_bits: u8 ) -> usize
Decompress the
compress
array to the decompressed
array.
The compressed
array is assumed to have been strict-delta-encoded and compressed. Read moresource§fn num_bits(&self, decompressed: &[u32]) -> u8
fn num_bits(&self, decompressed: &[u32]) -> u8
Returns the minimum number of bits used to represent the largest integer in the
decompressed
block. Read moresource§fn num_bits_sorted(&self, initial: u32, decompressed: &[u32]) -> u8
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 moresource§fn num_bits_strictly_sorted(
&self,
initial: Option<u32>,
decompressed: &[u32]
) -> u8
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 moresource§fn compressed_block_size(num_bits: u8) -> usize
fn compressed_block_size(num_bits: u8) -> usize
Returns the size of a compressed block.
source§impl Clone for BitPacker8x
impl Clone for BitPacker8x
source§fn clone(&self) -> BitPacker8x
fn clone(&self) -> BitPacker8x
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Copy for BitPacker8x
Auto Trait Implementations§
impl RefUnwindSafe for BitPacker8x
impl Send for BitPacker8x
impl Sync for BitPacker8x
impl Unpin for BitPacker8x
impl UnwindSafe for BitPacker8x
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