polars_parquet::parquet::encoding::bitpacked

Trait Unpackable

Source
pub trait Unpackable:
    Copy
    + Sized
    + Default {
    type Packed: Packed;
    type Unpacked: Unpacked<Self>;

    // Required methods
    fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked);
    fn pack(unpacked: &Self::Unpacked, num_bits: usize, packed: &mut [u8]);
}
Expand description

A type representing a type that can be bitpacked and unpacked by this crate.

Required Associated Types§

Required Methods§

Source

fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked)

Source

fn pack(unpacked: &Self::Unpacked, num_bits: usize, packed: &mut [u8])

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Unpackable for u32

Source§

type Packed = [u8; 128]

Source§

type Unpacked = [u32; 32]

Source§

fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked)

Source§

fn pack(packed: &Self::Unpacked, num_bits: usize, unpacked: &mut [u8])

Source§

impl Unpackable for u64

Source§

type Packed = [u8; 512]

Source§

type Unpacked = [u64; 64]

Source§

fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked)

Source§

fn pack(packed: &Self::Unpacked, num_bits: usize, unpacked: &mut [u8])

Implementors§